@ -62,7 +62,7 @@
# include <assert.h>
# include <stdlib.h>
KWalletEditor: : K WalletEditor( const TQString & wallet , bool isPath , TQWidget * parent , const char * name )
TDEWalletEditor: : TDE WalletEditor( const TQString & wallet , bool isPath , TQWidget * parent , const char * name )
: TDEMainWindow ( parent , name ) , _walletName ( wallet ) , _nonLocal ( isPath ) {
_newWallet = false ;
_ww = new WalletWidget ( this , " Wallet Widget " ) ;
@ -71,7 +71,7 @@ KWalletEditor::KWalletEditor(const TQString& wallet, bool isPath, TQWidget *pare
TQVBoxLayout * box = new TQVBoxLayout ( _ww - > _entryListFrame ) ;
box - > setSpacing ( KDialog : : spacingHint ( ) ) ;
box - > setMargin ( KDialog : : marginHint ( ) ) ;
_entryList = new K WalletEntryList( _ww - > _entryListFrame , " Wallet Entry List " ) ;
_entryList = new TDE WalletEntryList( _ww - > _entryListFrame , " Wallet Entry List " ) ;
box - > addWidget ( new TDEListViewSearchLineWidget ( _entryList , _ww - > _entryListFrame ) ) ;
box - > addWidget ( _entryList ) ;
@ -116,7 +116,7 @@ KWalletEditor::KWalletEditor(const TQString& wallet, bool isPath, TQWidget *pare
_walletIsOpen = false ;
_w = K Wallet: : Wallet : : openWallet ( wallet , winId ( ) , isPath ? KWallet: : Wallet : : Path : K Wallet: : Wallet : : Asynchronous ) ;
_w = TDE Wallet: : Wallet : : openWallet ( wallet , winId ( ) , isPath ? TDEWallet: : Wallet : : Path : TDE Wallet: : Wallet : : Asynchronous ) ;
if ( _w ) {
connect ( _w , TQT_SIGNAL ( walletOpened ( bool ) ) , this , TQT_SLOT ( walletOpened ( bool ) ) ) ;
connect ( _w , TQT_SIGNAL ( walletClosed ( ) ) , this , TQT_SLOT ( walletClosed ( ) ) ) ;
@ -136,7 +136,7 @@ KWalletEditor::KWalletEditor(const TQString& wallet, bool isPath, TQWidget *pare
TQTimer : : singleShot ( 0 , this , TQT_SLOT ( layout ( ) ) ) ;
}
KWalletEditor: : ~ K WalletEditor( ) {
TDEWalletEditor: : ~ TDE WalletEditor( ) {
emit editorClosed ( this ) ;
delete _newFolderAction ;
_newFolderAction = 0L ;
@ -145,11 +145,11 @@ KWalletEditor::~KWalletEditor() {
delete _w ;
_w = 0L ;
if ( _nonLocal ) {
K Wallet: : Wallet : : closeWallet ( _walletName , true ) ;
TDE Wallet: : Wallet : : closeWallet ( _walletName , true ) ;
}
}
void K WalletEditor: : layout ( ) {
void TDE WalletEditor: : layout ( ) {
TQValueList < int > sz = _ww - > _splitter - > sizes ( ) ;
int sum = sz [ 0 ] + sz [ 1 ] ;
sz [ 0 ] = sum / 2 ;
@ -157,7 +157,7 @@ void KWalletEditor::layout() {
_ww - > _splitter - > setSizes ( sz ) ;
}
void K WalletEditor: : createActions ( ) {
void TDE WalletEditor: : createActions ( ) {
_newFolderAction = new TDEAction ( i18n ( " &New Folder... " ) , " folder_new " ,
0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( createFolder ( ) ) , actionCollection ( ) ,
" create_folder " ) ;
@ -209,7 +209,7 @@ actionCollection());
}
void K WalletEditor: : walletClosed ( ) {
void TDE WalletEditor: : walletClosed ( ) {
delete _w ;
_walletIsOpen = false ;
_w = 0L ;
@ -221,12 +221,12 @@ void KWalletEditor::walletClosed() {
}
void K WalletEditor: : updateFolderList ( bool checkEntries ) {
void TDE WalletEditor: : updateFolderList ( bool checkEntries ) {
TQStringList fl = _w - > folderList ( ) ;
TQPtrStack < TQListViewItem > trash ;
for ( TQListViewItem * i = _entryList - > firstChild ( ) ; i ; i = i - > nextSibling ( ) ) {
KWalletFolderItem * fi = dynamic_cast < K WalletFolderItem * > ( i ) ;
TDEWalletFolderItem * fi = dynamic_cast < TDE WalletFolderItem * > ( i ) ;
if ( ! fi ) {
continue ;
}
@ -248,26 +248,26 @@ void KWalletEditor::updateFolderList(bool checkEntries) {
_w - > setFolder ( * i ) ;
TQStringList entries = _w - > entryList ( ) ;
KWalletFolderItem * item = new K WalletFolderItem( _w , _entryList ,
TDEWalletFolderItem * item = new TDE WalletFolderItem( _w , _entryList ,
* i , entries . count ( ) ) ;
KWalletContainerItem * pi = new K WalletContainerItem( item , i18n ( " Passwords " ) , K Wallet: : Wallet : : Password ) ;
KWalletContainerItem * mi = new K WalletContainerItem( item , i18n ( " Maps " ) , K Wallet: : Wallet : : Map ) ;
KWalletContainerItem * bi = new K WalletContainerItem( item , i18n ( " Binary Data " ) , K Wallet: : Wallet : : Stream ) ;
KWalletContainerItem * ui = new K WalletContainerItem( item , i18n ( " Unknown " ) , K Wallet: : Wallet : : Unknown ) ;
TDEWalletContainerItem * pi = new TDE WalletContainerItem( item , i18n ( " Passwords " ) , TDE Wallet: : Wallet : : Password ) ;
TDEWalletContainerItem * mi = new TDE WalletContainerItem( item , i18n ( " Maps " ) , TDE Wallet: : Wallet : : Map ) ;
TDEWalletContainerItem * bi = new TDE WalletContainerItem( item , i18n ( " Binary Data " ) , TDE Wallet: : Wallet : : Stream ) ;
TDEWalletContainerItem * ui = new TDE WalletContainerItem( item , i18n ( " Unknown " ) , TDE Wallet: : Wallet : : Unknown ) ;
for ( TQStringList : : Iterator j = entries . begin ( ) ; j ! = entries . end ( ) ; + + j ) {
switch ( _w - > entryType ( * j ) ) {
case K Wallet: : Wallet : : Password :
new K WalletEntryItem( _w , pi , * j ) ;
case TDE Wallet: : Wallet : : Password :
new TDE WalletEntryItem( _w , pi , * j ) ;
break ;
case K Wallet: : Wallet : : Stream :
new K WalletEntryItem( _w , bi , * j ) ;
case TDE Wallet: : Wallet : : Stream :
new TDE WalletEntryItem( _w , bi , * j ) ;
break ;
case K Wallet: : Wallet : : Map :
new K WalletEntryItem( _w , mi , * j ) ;
case TDE Wallet: : Wallet : : Map :
new TDE WalletEntryItem( _w , mi , * j ) ;
break ;
case K Wallet: : Wallet : : Unknown :
case TDE Wallet: : Wallet : : Unknown :
default :
new TQListViewItem ( ui , * j ) ;
break ;
@ -284,11 +284,11 @@ void KWalletEditor::updateFolderList(bool checkEntries) {
}
}
void K WalletEditor: : deleteFolder ( ) {
void TDE WalletEditor: : deleteFolder ( ) {
if ( _w ) {
TQListViewItem * i = _entryList - > currentItem ( ) ;
if ( i ) {
KWalletFolderItem * fi = dynamic_cast < K WalletFolderItem * > ( i ) ;
TDEWalletFolderItem * fi = dynamic_cast < TDE WalletFolderItem * > ( i ) ;
if ( ! fi ) {
return ;
}
@ -310,7 +310,7 @@ void KWalletEditor::deleteFolder() {
}
void K WalletEditor: : createFolder ( ) {
void TDE WalletEditor: : createFolder ( ) {
if ( _w ) {
TQString n ;
bool ok ;
@ -342,18 +342,18 @@ void KWalletEditor::createFolder() {
}
void K WalletEditor: : saveEntry ( ) {
void TDE WalletEditor: : saveEntry ( ) {
int rc = 1 ;
TQListViewItem * item = _entryList - > currentItem ( ) ;
_ww - > _saveChanges - > setEnabled ( false ) ;
_ww - > _undoChanges - > setEnabled ( false ) ;
if ( item & & _w & & item - > parent ( ) ) {
KWalletContainerItem * ci = dynamic_cast < K WalletContainerItem* > ( item - > parent ( ) ) ;
TDEWalletContainerItem * ci = dynamic_cast < TDE WalletContainerItem* > ( item - > parent ( ) ) ;
if ( ci ) {
if ( ci - > type ( ) = = K Wallet: : Wallet : : Password ) {
if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Password ) {
rc = _w - > writePassword ( item - > text ( 0 ) , _ww - > _passwordValue - > text ( ) ) ;
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Map ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Map ) {
_mapEditor - > saveMap ( ) ;
rc = _w - > writeMap ( item - > text ( 0 ) , _currentMap ) ;
} else {
@ -370,34 +370,34 @@ void KWalletEditor::saveEntry() {
}
void K WalletEditor: : restoreEntry ( ) {
void TDE WalletEditor: : restoreEntry ( ) {
entrySelectionChanged ( _entryList - > currentItem ( ) ) ;
}
void K WalletEditor: : entryEditted ( ) {
void TDE WalletEditor: : entryEditted ( ) {
_ww - > _saveChanges - > setEnabled ( true ) ;
_ww - > _undoChanges - > setEnabled ( true ) ;
}
void K WalletEditor: : entrySelectionChanged ( TQListViewItem * item ) {
K WalletContainerItem * ci = 0L ;
K WalletFolderItem * fi = 0L ;
void TDE WalletEditor: : entrySelectionChanged ( TQListViewItem * item ) {
TDE WalletContainerItem * ci = 0L ;
TDE WalletFolderItem * fi = 0L ;
switch ( item - > rtti ( ) ) {
case K WalletEntryItemClass:
ci = dynamic_cast < K WalletContainerItem* > ( item - > parent ( ) ) ;
case TDE WalletEntryItemClass:
ci = dynamic_cast < TDE WalletContainerItem* > ( item - > parent ( ) ) ;
if ( ! ci ) {
return ;
}
fi = dynamic_cast < K WalletFolderItem* > ( ci - > parent ( ) ) ;
fi = dynamic_cast < TDE WalletFolderItem* > ( ci - > parent ( ) ) ;
if ( ! fi ) {
return ;
}
_w - > setFolder ( fi - > name ( ) ) ;
_deleteFolderAction - > setEnabled ( false ) ;
if ( ci - > type ( ) = = K Wallet: : Wallet : : Password ) {
if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Password ) {
TQString pass ;
if ( _w - > readPassword ( item - > text ( 0 ) , pass ) = = 0 ) {
_ww - > _entryStack - > raiseWidget ( int ( 4 ) ) ;
@ -407,7 +407,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
_ww - > _saveChanges - > setEnabled ( false ) ;
_ww - > _undoChanges - > setEnabled ( false ) ;
}
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Map ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Map ) {
_ww - > _entryStack - > raiseWidget ( int ( 2 ) ) ;
_mapEditorShowHide - > setChecked ( false ) ;
showHideMapEditorValue ( false ) ;
@ -417,7 +417,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
_ww - > _saveChanges - > setEnabled ( false ) ;
_ww - > _undoChanges - > setEnabled ( false ) ;
}
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Stream ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Stream ) {
_ww - > _entryStack - > raiseWidget ( int ( 3 ) ) ;
TQByteArray ba ;
if ( _w - > readEntry ( item - > text ( 0 ) , ba ) = = 0 ) {
@ -429,8 +429,8 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
}
break ;
case K WalletContainerItemClass:
fi = dynamic_cast < K WalletFolderItem* > ( item - > parent ( ) ) ;
case TDE WalletContainerItemClass:
fi = dynamic_cast < TDE WalletFolderItem* > ( item - > parent ( ) ) ;
if ( ! fi ) {
return ;
}
@ -440,8 +440,8 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
_ww - > _entryStack - > raiseWidget ( int ( 0 ) ) ;
break ;
case K WalletFolderItemClass:
fi = dynamic_cast < K WalletFolderItem* > ( item ) ;
case TDE WalletFolderItemClass:
fi = dynamic_cast < TDE WalletFolderItem* > ( item ) ;
if ( ! fi ) {
return ;
}
@ -459,22 +459,22 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
}
}
void K WalletEditor: : updateEntries ( const TQString & folder ) {
void TDE WalletEditor: : updateEntries ( const TQString & folder ) {
TQPtrStack < TQListViewItem > trash ;
_w - > setFolder ( folder ) ;
TQStringList entries = _w - > entryList ( ) ;
K WalletFolderItem * fi = _entryList - > getFolder ( folder ) ;
TDE WalletFolderItem * fi = _entryList - > getFolder ( folder ) ;
if ( ! fi ) {
return ;
}
K WalletContainerItem * pi = fi - > getContainer ( K Wallet: : Wallet : : Password ) ;
K WalletContainerItem * mi = fi - > getContainer ( K Wallet: : Wallet : : Map ) ;
K WalletContainerItem * bi = fi - > getContainer ( K Wallet: : Wallet : : Stream ) ;
K WalletContainerItem * ui = fi - > getContainer ( K Wallet: : Wallet : : Unknown ) ;
TDE WalletContainerItem * pi = fi - > getContainer ( TDE Wallet: : Wallet : : Password ) ;
TDE WalletContainerItem * mi = fi - > getContainer ( TDE Wallet: : Wallet : : Map ) ;
TDE WalletContainerItem * bi = fi - > getContainer ( TDE Wallet: : Wallet : : Stream ) ;
TDE WalletContainerItem * ui = fi - > getContainer ( TDE Wallet: : Wallet : : Unknown ) ;
// Remove deleted entries
for ( TQListViewItem * i = pi - > firstChild ( ) ; i ; i = i - > nextSibling ( ) ) {
@ -523,16 +523,16 @@ void KWalletEditor::updateEntries(const TQString& folder) {
}
switch ( _w - > entryType ( * i ) ) {
case K Wallet: : Wallet : : Password :
new K WalletEntryItem( _w , pi , * i ) ;
case TDE Wallet: : Wallet : : Password :
new TDE WalletEntryItem( _w , pi , * i ) ;
break ;
case K Wallet: : Wallet : : Stream :
new K WalletEntryItem( _w , bi , * i ) ;
case TDE Wallet: : Wallet : : Stream :
new TDE WalletEntryItem( _w , bi , * i ) ;
break ;
case K Wallet: : Wallet : : Map :
new K WalletEntryItem( _w , mi , * i ) ;
case TDE Wallet: : Wallet : : Map :
new TDE WalletEntryItem( _w , mi , * i ) ;
break ;
case K Wallet: : Wallet : : Unknown :
case TDE Wallet: : Wallet : : Unknown :
default :
new TQListViewItem ( ui , * i ) ;
break ;
@ -548,33 +548,33 @@ void KWalletEditor::updateEntries(const TQString& folder) {
}
}
void K WalletEditor: : listContextMenuRequested ( TQListViewItem * item , const TQPoint & pos , int col ) {
void TDE WalletEditor: : listContextMenuRequested ( TQListViewItem * item , const TQPoint & pos , int col ) {
Q_UNUSED ( col )
if ( ! _walletIsOpen ) {
return ;
}
KWalletListItemClasses menuClass = K WalletUnknownClass;
K WalletContainerItem * ci = 0L ;
TDEWalletListItemClasses menuClass = TDE WalletUnknownClass;
TDE WalletContainerItem * ci = 0L ;
if ( item ) {
if ( item - > rtti ( ) = = K WalletEntryItemClass) {
ci = dynamic_cast < K WalletContainerItem * > ( item - > parent ( ) ) ;
if ( item - > rtti ( ) = = TDE WalletEntryItemClass) {
ci = dynamic_cast < TDE WalletContainerItem * > ( item - > parent ( ) ) ;
if ( ! ci ) {
return ;
}
} else if ( item - > rtti ( ) = = K WalletContainerItemClass) {
ci = dynamic_cast < K WalletContainerItem * > ( item ) ;
} else if ( item - > rtti ( ) = = TDE WalletContainerItemClass) {
ci = dynamic_cast < TDE WalletContainerItem * > ( item ) ;
if ( ! ci ) {
return ;
}
}
if ( ci & & ci - > type ( ) = = K Wallet: : Wallet : : Unknown ) {
if ( ci & & ci - > type ( ) = = TDE Wallet: : Wallet : : Unknown ) {
return ;
}
menuClass = static_cast < K WalletListItemClasses> ( item - > rtti ( ) ) ;
menuClass = static_cast < TDE WalletListItemClasses> ( item - > rtti ( ) ) ;
}
TDEPopupMenu * m = new TDEPopupMenu ( this ) ;
@ -584,21 +584,21 @@ void KWalletEditor::listContextMenuRequested(TQListViewItem *item, const TQPoint
title = KStringHandler : : cPixelSqueeze ( title , m - > fontMetrics ( ) , 200 ) ;
m - > insertTitle ( title ) ;
switch ( menuClass ) {
case K WalletEntryItemClass:
case TDE WalletEntryItemClass:
m - > insertItem ( i18n ( " &New... " ) , this , TQT_SLOT ( newEntry ( ) ) , Key_Insert ) ;
m - > insertItem ( i18n ( " &Rename " ) , this , TQT_SLOT ( renameEntry ( ) ) , Key_F2 ) ;
m - > insertItem ( i18n ( " &Delete " ) , this , TQT_SLOT ( deleteEntry ( ) ) , Key_Delete ) ;
if ( ci & & ci - > type ( ) = = K Wallet: : Wallet : : Password ) {
if ( ci & & ci - > type ( ) = = TDE Wallet: : Wallet : : Password ) {
m - > insertSeparator ( ) ;
_copyPassAction - > plug ( m ) ;
}
break ;
case K WalletContainerItemClass:
case TDE WalletContainerItemClass:
m - > insertItem ( i18n ( " &New... " ) , this , TQT_SLOT ( newEntry ( ) ) , Key_Insert ) ;
break ;
case K WalletFolderItemClass:
case TDE WalletFolderItemClass:
_newFolderAction - > plug ( m ) ;
_deleteFolderAction - > plug ( m ) ;
break ;
@ -612,7 +612,7 @@ void KWalletEditor::listContextMenuRequested(TQListViewItem *item, const TQPoint
}
void K WalletEditor: : copyPassword ( ) {
void TDE WalletEditor: : copyPassword ( ) {
TQListViewItem * item = _entryList - > selectedItem ( ) ;
if ( _w & & item ) {
TQString pass ;
@ -623,21 +623,21 @@ void KWalletEditor::copyPassword() {
}
void K WalletEditor: : newEntry ( ) {
void TDE WalletEditor: : newEntry ( ) {
TQListViewItem * item = _entryList - > selectedItem ( ) ;
TQString n ;
bool ok ;
TQListViewItem * p ;
K WalletFolderItem * fi ;
TDE WalletFolderItem * fi ;
//set the folder where we're trying to create the new entry
if ( _w & & item ) {
p = item ;
if ( p - > rtti ( ) = = K WalletEntryItemClass) {
if ( p - > rtti ( ) = = TDE WalletEntryItemClass) {
p = item - > parent ( ) ;
}
fi = dynamic_cast < K WalletFolderItem * > ( p - > parent ( ) ) ;
fi = dynamic_cast < TDE WalletFolderItem * > ( p - > parent ( ) ) ;
if ( ! fi ) {
return ;
}
@ -670,31 +670,31 @@ void KWalletEditor::newEntry() {
if ( _w & & item & & ! n . isEmpty ( ) ) {
TQListViewItem * p = item ;
if ( p - > rtti ( ) = = K WalletEntryItemClass) {
if ( p - > rtti ( ) = = TDE WalletEntryItemClass) {
p = item - > parent ( ) ;
}
KWalletFolderItem * fi = dynamic_cast < K WalletFolderItem * > ( p - > parent ( ) ) ;
TDEWalletFolderItem * fi = dynamic_cast < TDE WalletFolderItem * > ( p - > parent ( ) ) ;
if ( ! fi ) {
KMessageBox : : error ( this , i18n ( " An unexpected error occurred trying to add the new entry " ) ) ;
return ;
}
_w - > setFolder ( fi - > name ( ) ) ;
KWalletEntryItem * ni = new K WalletEntryItem( _w , p , n ) ;
TDEWalletEntryItem * ni = new TDE WalletEntryItem( _w , p , n ) ;
_entryList - > setSelected ( ni , true ) ;
_entryList - > ensureItemVisible ( ni ) ;
KWalletContainerItem * ci = dynamic_cast < K WalletContainerItem* > ( p ) ;
TDEWalletContainerItem * ci = dynamic_cast < TDE WalletContainerItem* > ( p ) ;
if ( ! ci ) {
KMessageBox : : error ( this , i18n ( " An unexpected error occurred trying to add the new entry " ) ) ;
return ;
}
if ( ci - > type ( ) = = K Wallet: : Wallet : : Password ) {
if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Password ) {
_w - > writePassword ( n , TQString ( ) ) ;
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Map ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Map ) {
_w - > writeMap ( n , TQMap < TQString , TQString > ( ) ) ;
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Stream ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Stream ) {
_w - > writeEntry ( n , TQByteArray ( ) ) ;
} else {
abort ( ) ;
@ -705,7 +705,7 @@ void KWalletEditor::newEntry() {
}
void K WalletEditor: : renameEntry ( ) {
void TDE WalletEditor: : renameEntry ( ) {
TQListViewItem * item = _entryList - > selectedItem ( ) ;
if ( _w & & item ) {
item - > startRename ( 0 ) ;
@ -713,10 +713,10 @@ void KWalletEditor::renameEntry() {
}
// Only supports renaming of K WalletEntryItem derived classes.
void K WalletEditor: : listItemRenamed ( TQListViewItem * item , int , const TQString & t ) {
// Only supports renaming of TDE WalletEntryItem derived classes.
void TDE WalletEditor: : listItemRenamed ( TQListViewItem * item , int , const TQString & t ) {
if ( item ) {
KWalletEntryItem * i = dynamic_cast < K WalletEntryItem* > ( item ) ;
TDEWalletEntryItem * i = dynamic_cast < TDE WalletEntryItem* > ( item ) ;
if ( ! i ) {
return ;
}
@ -728,16 +728,16 @@ void KWalletEditor::listItemRenamed(TQListViewItem* item, int, const TQString& t
if ( _w - > renameEntry ( i - > oldName ( ) , t ) = = 0 ) {
i - > clearOldName ( ) ;
KWalletContainerItem * ci = dynamic_cast < K WalletContainerItem* > ( item - > parent ( ) ) ;
TDEWalletContainerItem * ci = dynamic_cast < TDE WalletContainerItem* > ( item - > parent ( ) ) ;
if ( ! ci ) {
KMessageBox : : error ( this , i18n ( " An unexpected error occurred trying to rename the entry " ) ) ;
return ;
}
if ( ci - > type ( ) = = K Wallet: : Wallet : : Password ) {
if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Password ) {
_ww - > _entryName - > setText ( i18n ( " Password: %1 " ) . arg ( item - > text ( 0 ) ) ) ;
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Map ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Map ) {
_ww - > _entryName - > setText ( i18n ( " Name-Value Map: %1 " ) . arg ( item - > text ( 0 ) ) ) ;
} else if ( ci - > type ( ) = = K Wallet: : Wallet : : Stream ) {
} else if ( ci - > type ( ) = = TDE Wallet: : Wallet : : Stream ) {
_ww - > _entryName - > setText ( i18n ( " Binary Data: %1 " ) . arg ( item - > text ( 0 ) ) ) ;
}
} else {
@ -747,12 +747,12 @@ void KWalletEditor::listItemRenamed(TQListViewItem* item, int, const TQString& t
}
void K WalletEditor: : deleteEntry ( ) {
void TDE WalletEditor: : deleteEntry ( ) {
TQListViewItem * item = _entryList - > selectedItem ( ) ;
if ( _w & & item ) {
int rc = KMessageBox : : warningContinueCancel ( this , i18n ( " Are you sure you wish to delete the item '%1'? " ) . arg ( item - > text ( 0 ) ) , " " , KStdGuiItem : : del ( ) ) ;
if ( rc = = KMessageBox : : Continue ) {
KWalletFolderItem * fi = dynamic_cast < K WalletFolderItem * > ( item - > parent ( ) - > parent ( ) ) ;
TDEWalletFolderItem * fi = dynamic_cast < TDE WalletFolderItem * > ( item - > parent ( ) - > parent ( ) ) ;
if ( ! fi ) {
KMessageBox : : error ( this , i18n ( " An unexpected error occurred trying to delete the entry " ) ) ;
return ;
@ -766,12 +766,12 @@ void KWalletEditor::deleteEntry() {
}
}
void K WalletEditor: : changePassword ( ) {
K Wallet: : Wallet : : changePassword ( _walletName ) ;
void TDE WalletEditor: : changePassword ( ) {
TDE Wallet: : Wallet : : changePassword ( _walletName ) ;
}
void K WalletEditor: : walletOpened ( bool success ) {
void TDE WalletEditor: : walletOpened ( bool success ) {
if ( success ) {
emit enableFolderActions ( true ) ;
emit enableContextFolderActions ( false ) ;
@ -789,17 +789,17 @@ void KWalletEditor::walletOpened(bool success) {
}
void K WalletEditor: : hidePasswordContents ( ) {
void TDE WalletEditor: : hidePasswordContents ( ) {
_ww - > _entryStack - > raiseWidget ( int ( 4 ) ) ;
}
void K WalletEditor: : showPasswordContents ( ) {
void TDE WalletEditor: : showPasswordContents ( ) {
_ww - > _entryStack - > raiseWidget ( int ( 1 ) ) ;
}
void K WalletEditor: : showHideMapEditorValue ( bool show ) {
void TDE WalletEditor: : showHideMapEditorValue ( bool show ) {
if ( show ) {
_mapEditor - > showColumn ( 2 ) ;
} else {
@ -810,7 +810,7 @@ void KWalletEditor::showHideMapEditorValue(bool show) {
enum MergePlan { Prompt = 0 , Always = 1 , Never = 2 , Yes = 3 , No = 4 } ;
void K WalletEditor: : importWallet ( ) {
void TDE WalletEditor: : importWallet ( ) {
KURL url = KFileDialog : : getOpenURL ( TQString ( ) , " *.kwl " , this ) ;
if ( url . isEmpty ( ) ) {
return ;
@ -822,7 +822,7 @@ void KWalletEditor::importWallet() {
return ;
}
KWallet: : Wallet * w = K Wallet: : Wallet : : openWallet ( tmpFile , winId ( ) , K Wallet: : Wallet : : Path ) ;
TDEWallet: : Wallet * w = TDE Wallet: : Wallet : : openWallet ( tmpFile , winId ( ) , TDE Wallet: : Wallet : : Path ) ;
if ( w & & w - > isOpen ( ) ) {
MergePlan mp = Prompt ;
TQStringList fl = w - > folderList ( ) ;
@ -938,7 +938,7 @@ void KWalletEditor::importWallet() {
}
void K WalletEditor: : importXML ( ) {
void TDE WalletEditor: : importXML ( ) {
KURL url = KFileDialog : : getOpenURL ( TQString ( ) , " *.xml " , this ) ;
if ( url . isEmpty ( ) ) {
return ;
@ -1044,7 +1044,7 @@ void KWalletEditor::importXML() {
}
void K WalletEditor: : exportXML ( ) {
void TDE WalletEditor: : exportXML ( ) {
KTempFile tf ;
tf . setAutoDelete ( true ) ;
TQTextStream & ts ( * tf . textStream ( ) ) ;
@ -1057,7 +1057,7 @@ void KWalletEditor::exportXML() {
TQStringList entries = _w - > entryList ( ) ;
for ( TQStringList : : Iterator j = entries . begin ( ) ; j ! = entries . end ( ) ; + + j ) {
switch ( _w - > entryType ( * j ) ) {
case K Wallet: : Wallet : : Password :
case TDE Wallet: : Wallet : : Password :
{
TQString pass ;
if ( _w - > readPassword ( * j , pass ) = = 0 ) {
@ -1067,7 +1067,7 @@ void KWalletEditor::exportXML() {
}
break ;
}
case K Wallet: : Wallet : : Stream :
case TDE Wallet: : Wallet : : Stream :
{
TQByteArray ba ;
if ( _w - > readEntry ( * j , ba ) = = 0 ) {
@ -1078,7 +1078,7 @@ void KWalletEditor::exportXML() {
}
break ;
}
case K Wallet: : Wallet : : Map :
case TDE Wallet: : Wallet : : Map :
{
TQMap < TQString , TQString > map ;
if ( _w - > readMap ( * j , map ) = = 0 ) {
@ -1090,7 +1090,7 @@ void KWalletEditor::exportXML() {
}
break ;
}
case K Wallet: : Wallet : : Unknown :
case TDE Wallet: : Wallet : : Unknown :
default :
break ;
}
@ -1119,12 +1119,12 @@ void KWalletEditor::exportXML() {
}
void K WalletEditor: : setNewWallet ( bool x ) {
void TDE WalletEditor: : setNewWallet ( bool x ) {
_newWallet = x ;
}
void K WalletEditor: : saveAs ( ) {
void TDE WalletEditor: : saveAs ( ) {
KURL url = KFileDialog : : getSaveURL ( TQString ( ) , " *.kwl " , this ) ;
if ( ! url . isEmpty ( ) ) {
// Sync() tdewalletd