Rename KWallet to TDEWallet

pull/1/head
Timothy Pearson 11 years ago
parent 8dd7e486be
commit d92b2b168d

@ -1,7 +1,7 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY tdewallet "<application>KWallet</application>"> <!ENTITY tdewallet "<application>TDEWallet</application>">
<!ENTITY tdewalletmanager "<application>KWallet Manager</application>"> <!ENTITY tdewalletmanager "<application>TDEWallet Manager</application>">
<!ENTITY package "tdeutils"> <!ENTITY package "tdeutils">
<!ENTITY kappname "&tdewallet;"> <!ENTITY kappname "&tdewallet;">
<!ENTITY % addindex "IGNORE"> <!ENTITY % addindex "IGNORE">

@ -36,9 +36,9 @@
#include <tqptrlist.h> #include <tqptrlist.h>
/**************** /****************
* KWalletFolderItem - ListView items to represent tdewallet folders * TDEWalletFolderItem - ListView items to represent tdewallet folders
*/ */
KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, const TQString &name, int entries) TDEWalletFolderItem::TDEWalletFolderItem(TDEWallet::Wallet *w, TQListView* parent, const TQString &name, int entries)
: TDEListViewItem(parent),_wallet(w),_name(name),_entries(entries) { : TDEListViewItem(parent),_wallet(w),_name(name),_entries(entries) {
setText(0, TQString("%1 (%2)").arg(_name).arg(_entries)); setText(0, TQString("%1 (%2)").arg(_name).arg(_entries));
setRenameEnabled(0, false); setRenameEnabled(0, false);
@ -50,7 +50,7 @@ KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, con
setPixmap(0,pix); setPixmap(0,pix);
} }
TQPixmap KWalletFolderItem::getFolderIcon(TDEIcon::Group group){ TQPixmap TDEWalletFolderItem::getFolderIcon(TDEIcon::Group group){
TDEIconLoader *loader = TDEGlobal::instance()->iconLoader(); TDEIconLoader *loader = TDEGlobal::instance()->iconLoader();
TQPixmap pix = loader->loadIcon( _name, group, 0, TQPixmap pix = loader->loadIcon( _name, group, 0,
TDEIcon::DefaultState, 0, true ); TDEIcon::DefaultState, 0, true );
@ -63,16 +63,16 @@ TQPixmap KWalletFolderItem::getFolderIcon(TDEIcon::Group group){
return pix; return pix;
} }
void KWalletFolderItem::refresh() { void TDEWalletFolderItem::refresh() {
TQString saveFolder = _wallet->currentFolder(); TQString saveFolder = _wallet->currentFolder();
_wallet->setFolder(_name); _wallet->setFolder(_name);
setText(0, TQString("%1 (%2)").arg(_name).arg(_wallet->entryList().count())); setText(0, TQString("%1 (%2)").arg(_name).arg(_wallet->entryList().count()));
_wallet->setFolder(saveFolder); _wallet->setFolder(saveFolder);
} }
KWalletContainerItem* KWalletFolderItem::getContainer(KWallet::Wallet::EntryType type) { TDEWalletContainerItem* TDEWalletFolderItem::getContainer(TDEWallet::Wallet::EntryType type) {
for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) { for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(i); TDEWalletContainerItem *ci = dynamic_cast<TDEWalletContainerItem *>(i);
if (!ci) { if (!ci) {
continue; continue;
} }
@ -83,13 +83,13 @@ KWalletContainerItem* KWalletFolderItem::getContainer(KWallet::Wallet::EntryType
return 0; return 0;
} }
bool KWalletFolderItem::contains(const TQString& key) { bool TDEWalletFolderItem::contains(const TQString& key) {
return (getItem(key) != 0); return (getItem(key) != 0);
} }
TQListViewItem* KWalletFolderItem::getItem(const TQString& key) { TQListViewItem* TDEWalletFolderItem::getItem(const TQString& key) {
for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) { for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KWalletContainerItem *ci = dynamic_cast<KWalletContainerItem *>(i); TDEWalletContainerItem *ci = dynamic_cast<TDEWalletContainerItem *>(i);
if (!ci) { if (!ci) {
continue; continue;
} }
@ -101,48 +101,48 @@ TQListViewItem* KWalletFolderItem::getItem(const TQString& key) {
return 0; return 0;
} }
bool KWalletFolderItem::acceptDrop(const TQMimeSource *mime) const { bool TDEWalletFolderItem::acceptDrop(const TQMimeSource *mime) const {
return mime->provides("application/x-tdewallet-entry") || return mime->provides("application/x-tdewallet-entry") ||
mime->provides("text/uri-list"); mime->provides("text/uri-list");
} }
int KWalletFolderItem::rtti() const { int TDEWalletFolderItem::rtti() const {
return KWalletFolderItemClass; return TDEWalletFolderItemClass;
} }
TQString KWalletFolderItem::name() const { TQString TDEWalletFolderItem::name() const {
return _name; return _name;
} }
KWalletFolderItem::~KWalletFolderItem() { TDEWalletFolderItem::~TDEWalletFolderItem() {
} }
/**************** /****************
* KWalletContainerItem - ListView items to represent tdewallet containers, i.e. * TDEWalletContainerItem - ListView items to represent tdewallet containers, i.e.
* passwords, maps, ... * passwords, maps, ...
*/ */
KWalletContainerItem::KWalletContainerItem(TQListViewItem* parent, const TQString &name, KWallet::Wallet::EntryType type) TDEWalletContainerItem::TDEWalletContainerItem(TQListViewItem* parent, const TQString &name, TDEWallet::Wallet::EntryType type)
: TDEListViewItem(parent, name), _type(type) { : TDEListViewItem(parent, name), _type(type) {
setRenameEnabled(0, false); setRenameEnabled(0, false);
setDragEnabled(true); setDragEnabled(true);
} }
KWalletContainerItem::~KWalletContainerItem() { TDEWalletContainerItem::~TDEWalletContainerItem() {
} }
int KWalletContainerItem::rtti() const { int TDEWalletContainerItem::rtti() const {
return KWalletContainerItemClass; return TDEWalletContainerItemClass;
} }
KWallet::Wallet::EntryType KWalletContainerItem::type() { TDEWallet::Wallet::EntryType TDEWalletContainerItem::type() {
return _type; return _type;
} }
bool KWalletContainerItem::contains(const TQString& key) { bool TDEWalletContainerItem::contains(const TQString& key) {
return getItem(key) != 0; return getItem(key) != 0;
} }
TQListViewItem *KWalletContainerItem::getItem(const TQString& key) { TQListViewItem *TDEWalletContainerItem::getItem(const TQString& key) {
for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) { for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) {
if (i->text(0) == key) { if (i->text(0) == key) {
return i; return i;
@ -152,37 +152,37 @@ TQListViewItem *KWalletContainerItem::getItem(const TQString& key) {
} }
/**************** /****************
* KWalletEntryItem - ListView items to represent tdewallet entries * TDEWalletEntryItem - ListView items to represent tdewallet entries
*/ */
KWalletEntryItem::KWalletEntryItem(KWallet::Wallet *w, TQListViewItem* parent, const TQString& ename) TDEWalletEntryItem::TDEWalletEntryItem(TDEWallet::Wallet *w, TQListViewItem* parent, const TQString& ename)
: TDEListViewItem(parent, ename), _wallet(w), _oldName(ename) { : TDEListViewItem(parent, ename), _wallet(w), _oldName(ename) {
setRenameEnabled(0, true); setRenameEnabled(0, true);
setDragEnabled(true); setDragEnabled(true);
} }
int KWalletEntryItem::rtti() const { int TDEWalletEntryItem::rtti() const {
return KWalletEntryItemClass; return TDEWalletEntryItemClass;
} }
KWalletEntryItem::~KWalletEntryItem() { TDEWalletEntryItem::~TDEWalletEntryItem() {
} }
/**************** /****************
* KWalletItem - IconView items to represent wallets * TDEWalletItem - IconView items to represent wallets
*/ */
KWalletItem::KWalletItem(TQIconView *parent, const TQString& walletName) TDEWalletItem::TDEWalletItem(TQIconView *parent, const TQString& walletName)
: TQIconViewItem(parent, walletName, DesktopIcon("tdewalletmanager")) { : TQIconViewItem(parent, walletName, DesktopIcon("tdewalletmanager")) {
} }
KWalletItem::~KWalletItem() { TDEWalletItem::~TDEWalletItem() {
} }
bool KWalletItem::acceptDrop(const TQMimeSource *mime) const { bool TDEWalletItem::acceptDrop(const TQMimeSource *mime) const {
return mime->provides("application/x-tdewallet-folder") || return mime->provides("application/x-tdewallet-folder") ||
mime->provides("text/uri-list"); mime->provides("text/uri-list");
} }
static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) { static bool decodeEntry(TDEWallet::Wallet *_wallet, TQDataStream& ds) {
TQ_UINT32 magic; TQ_UINT32 magic;
ds >> magic; ds >> magic;
if (magic != KWALLETENTRYMAGIC) { if (magic != KWALLETENTRYMAGIC) {
@ -191,7 +191,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) {
} }
TQString name; TQString name;
TQByteArray value; TQByteArray value;
KWallet::Wallet::EntryType et; TDEWallet::Wallet::EntryType et;
ds >> name; ds >> name;
if (_wallet->hasEntry(name)) { if (_wallet->hasEntry(name)) {
int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?").arg(name)); int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?").arg(name));
@ -201,13 +201,13 @@ static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) {
} }
long l; long l;
ds >> l; ds >> l;
et = KWallet::Wallet::EntryType(l); et = TDEWallet::Wallet::EntryType(l);
ds >> value; ds >> value;
_wallet->writeEntry(name, value, et); _wallet->writeEntry(name, value, et);
return true; return true;
} }
static bool decodeFolder(KWallet::Wallet *_wallet, TQDataStream& ds) { static bool decodeFolder(TDEWallet::Wallet *_wallet, TQDataStream& ds) {
TQ_UINT32 magic; TQ_UINT32 magic;
ds >> magic; ds >> magic;
if (magic != KWALLETFOLDERMAGIC) { if (magic != KWALLETFOLDERMAGIC) {
@ -233,25 +233,25 @@ static bool decodeFolder(KWallet::Wallet *_wallet, TQDataStream& ds) {
while (!ds.atEnd()) { while (!ds.atEnd()) {
TQString name; TQString name;
TQByteArray value; TQByteArray value;
KWallet::Wallet::EntryType et; TDEWallet::Wallet::EntryType et;
ds >> name; ds >> name;
long l; long l;
ds >> l; ds >> l;
et = KWallet::Wallet::EntryType(l); et = TDEWallet::Wallet::EntryType(l);
ds >> value; ds >> value;
_wallet->writeEntry(name, value, et); _wallet->writeEntry(name, value, et);
} }
return true; return true;
} }
void KWalletItem::dropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst) { void TDEWalletItem::dropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst) {
Q_UNUSED(lst); Q_UNUSED(lst);
if (e->provides("application/x-tdewallet-folder") || if (e->provides("application/x-tdewallet-folder") ||
e->provides("text/uri-list")) { e->provides("text/uri-list")) {
// FIXME: don't allow the drop if the wallet name is the same // FIXME: don't allow the drop if the wallet name is the same
KWallet::Wallet *_wallet = KWallet::Wallet::openWallet(text()); TDEWallet::Wallet *_wallet = TDEWallet::Wallet::openWallet(text());
if (!_wallet) { if (!_wallet) {
e->ignore(); e->ignore();
return; return;
@ -301,14 +301,14 @@ void KWalletItem::dropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst
//delete the folder from the source if we were moving //delete the folder from the source if we were moving
TQt::ButtonState state = kapp->keyboardMouseState(); TQt::ButtonState state = kapp->keyboardMouseState();
if (e->source() && e->source()->parent() && if (e->source() && e->source()->parent() &&
!strcmp(e->source()->parent()->className(), "KWalletEntryList") && !strcmp(e->source()->parent()->className(), "TDEWalletEntryList") &&
!(state & TQt::ControlButton)) { !(state & TQt::ControlButton)) {
KWalletEntryList *el = TDEWalletEntryList *el =
dynamic_cast<KWalletEntryList*>(e->source()->parent()); dynamic_cast<TDEWalletEntryList*>(e->source()->parent());
if (el) { if (el) {
KWalletFolderItem *fi = TDEWalletFolderItem *fi =
dynamic_cast<KWalletFolderItem*>(el->selectedItem()); dynamic_cast<TDEWalletFolderItem*>(el->selectedItem());
if (fi) { if (fi) {
el->_wallet->removeFolder(fi->name()); el->_wallet->removeFolder(fi->name());
} }
@ -322,33 +322,33 @@ void KWalletItem::dropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst
} }
/**************** /****************
* KWalletEntryDrag - Stores data for wallet entry drags * TDEWalletEntryDrag - Stores data for wallet entry drags
*/ */
class KWalletEntryDrag : public TQStoredDrag { class TDEWalletEntryDrag : public TQStoredDrag {
public: public:
KWalletEntryDrag(TQWidget *dragSource, const char *name = 0L) TDEWalletEntryDrag(TQWidget *dragSource, const char *name = 0L)
: TQStoredDrag("application/x-tdewallet-entry", dragSource, name) { : TQStoredDrag("application/x-tdewallet-entry", dragSource, name) {
} }
virtual ~KWalletEntryDrag() {} virtual ~TDEWalletEntryDrag() {}
}; };
/**************** /****************
* KWalletFolderDrag - Stores data for wallet folder drags * TDEWalletFolderDrag - Stores data for wallet folder drags
*/ */
class KWalletFolderDrag : public TQStoredDrag { class TDEWalletFolderDrag : public TQStoredDrag {
public: public:
KWalletFolderDrag(TQWidget *dragSource, const char *name = 0L) TDEWalletFolderDrag(TQWidget *dragSource, const char *name = 0L)
: TQStoredDrag("application/x-tdewallet-folder", dragSource, name) { : TQStoredDrag("application/x-tdewallet-folder", dragSource, name) {
} }
virtual ~KWalletFolderDrag() {} virtual ~TDEWalletFolderDrag() {}
}; };
/**************** /****************
* KWalletEntryList - A listview to store wallet entries * TDEWalletEntryList - A listview to store wallet entries
*/ */
KWalletEntryList::KWalletEntryList(TQWidget *parent, const char *name) TDEWalletEntryList::TDEWalletEntryList(TQWidget *parent, const char *name)
: TDEListView(parent, name) { : TDEListView(parent, name) {
addColumn(i18n("Folders")); addColumn(i18n("Folders"));
setRootIsDecorated(true); setRootIsDecorated(true);
@ -359,10 +359,10 @@ KWalletEntryList::KWalletEntryList(TQWidget *parent, const char *name)
viewport()->setAcceptDrops(true); viewport()->setAcceptDrops(true);
} }
KWalletEntryList::~KWalletEntryList() { TDEWalletEntryList::~TDEWalletEntryList() {
} }
bool KWalletEntryList::acceptDrag(TQDropEvent* e) const { bool TDEWalletEntryList::acceptDrag(TQDropEvent* e) const {
TQListViewItem *i = itemAt(contentsToViewport(e->pos())); TQListViewItem *i = itemAt(contentsToViewport(e->pos()));
if (i) { if (i) {
if (e->provides("application/x-tdewallet-entry") || if (e->provides("application/x-tdewallet-entry") ||
@ -379,20 +379,20 @@ bool KWalletEntryList::acceptDrag(TQDropEvent* e) const {
} }
//returns true if the item has been dropped successfully //returns true if the item has been dropped successfully
void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) { void TDEWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) {
bool ok = true; bool ok = true;
bool isEntry; bool isEntry;
TQFile file; TQFile file;
TQDataStream *ds; TQDataStream *ds;
KWalletEntryList *el = 0L; TDEWalletEntryList *el = 0L;
TQListViewItem *sel = 0L; TQListViewItem *sel = 0L;
//detect if we are dragging from tdewallet itself //detect if we are dragging from tdewallet itself
if (e->source() && e->source()->parent() && if (e->source() && e->source()->parent() &&
!strcmp(e->source()->parent()->className(), "KWalletEntryList")) { !strcmp(e->source()->parent()->className(), "TDEWalletEntryList")) {
el = dynamic_cast<KWalletEntryList*>(e->source()->parent()); el = dynamic_cast<TDEWalletEntryList*>(e->source()->parent());
if (!el) { if (!el) {
KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the item")); KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the item"));
} else } else
@ -402,7 +402,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) {
if (e->provides("application/x-tdewallet-entry")) { if (e->provides("application/x-tdewallet-entry")) {
//do nothing if we are in the same folder //do nothing if we are in the same folder
if (sel && sel->parent()->parent() == if (sel && sel->parent()->parent() ==
KWalletEntryList::getItemFolder(item)) { TDEWalletEntryList::getItemFolder(item)) {
e->ignore(); e->ignore();
return; return;
} }
@ -474,7 +474,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) {
e->ignore(); e->ignore();
return; return;
} }
KWalletFolderItem *fi = KWalletEntryList::getItemFolder(item); TDEWalletFolderItem *fi = TDEWalletEntryList::getItemFolder(item);
if (!fi) { if (!fi) {
KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the entry")); KMessageBox::error(this, i18n("An unexpected error occurred trying to drop the entry"));
delete(ds); delete(ds);
@ -500,7 +500,7 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) {
//delete source if we were moving, i.e., we are dragging //delete source if we were moving, i.e., we are dragging
//from tdewalletmanager and Control is not pressed //from tdewalletmanager and Control is not pressed
if (ok && el && !(state & TQt::ControlButton) && sel) { if (ok && el && !(state & TQt::ControlButton) && sel) {
KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(sel); TDEWalletFolderItem *fi = dynamic_cast<TDEWalletFolderItem *>(sel);
if (fi) { if (fi) {
el->_wallet->removeFolder(fi->name()); el->_wallet->removeFolder(fi->name());
delete sel; delete sel;
@ -512,13 +512,13 @@ void KWalletEntryList::itemDropped(TQDropEvent *e, TQListViewItem *item) {
} }
} }
void KWalletEntryList::setWallet(KWallet::Wallet *w) { void TDEWalletEntryList::setWallet(TDEWallet::Wallet *w) {
_wallet = w; _wallet = w;
} }
bool KWalletEntryList::existsFolder(const TQString& name) { bool TDEWalletEntryList::existsFolder(const TQString& name) {
for (TQListViewItem *vi = firstChild(); vi; vi = vi->nextSibling()) { for (TQListViewItem *vi = firstChild(); vi; vi = vi->nextSibling()) {
KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(vi); TDEWalletFolderItem *fi = dynamic_cast<TDEWalletFolderItem *>(vi);
if (!fi) { if (!fi) {
continue; continue;
} }
@ -529,12 +529,12 @@ bool KWalletEntryList::existsFolder(const TQString& name) {
return false; return false;
} }
void KWalletEntryList::contentsDropEvent(TQDropEvent *e) { void TDEWalletEntryList::contentsDropEvent(TQDropEvent *e) {
TQListViewItem *i = itemAt(contentsToViewport(e->pos())); TQListViewItem *i = itemAt(contentsToViewport(e->pos()));
itemDropped(e, i); itemDropped(e, i);
} }
void KWalletEntryList::contentsDragEnterEvent(TQDragEnterEvent *e) { void TDEWalletEntryList::contentsDragEnterEvent(TQDragEnterEvent *e) {
if (e->provides("application/x-tdewallet-entry") || if (e->provides("application/x-tdewallet-entry") ||
e->provides("application/x-tdewallet-folder") || e->provides("application/x-tdewallet-folder") ||
e->provides("application/uri-list")) { e->provides("application/uri-list")) {
@ -544,9 +544,9 @@ void KWalletEntryList::contentsDragEnterEvent(TQDragEnterEvent *e) {
} }
} }
KWalletFolderItem* KWalletEntryList::getFolder(const TQString& name) { TDEWalletFolderItem* TDEWalletEntryList::getFolder(const TQString& name) {
for (TQListViewItem *vi = firstChild(); vi; vi = vi->nextSibling()) { for (TQListViewItem *vi = firstChild(); vi; vi = vi->nextSibling()) {
KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(vi); TDEWalletFolderItem *fi = dynamic_cast<TDEWalletFolderItem *>(vi);
if (!fi) { if (!fi) {
continue; continue;
} }
@ -557,28 +557,28 @@ KWalletFolderItem* KWalletEntryList::getFolder(const TQString& name) {
return 0; return 0;
} }
KWalletFolderItem *KWalletEntryList::getItemFolder(TQListViewItem *item) { TDEWalletFolderItem *TDEWalletEntryList::getItemFolder(TQListViewItem *item) {
switch (item->rtti()) { switch (item->rtti()) {
case KWalletFolderItemClass: case TDEWalletFolderItemClass:
return dynamic_cast<KWalletFolderItem *>(item); return dynamic_cast<TDEWalletFolderItem *>(item);
case KWalletContainerItemClass: case TDEWalletContainerItemClass:
return dynamic_cast<KWalletFolderItem *>(item->parent()); return dynamic_cast<TDEWalletFolderItem *>(item->parent());
case KWalletEntryItemClass: case TDEWalletEntryItemClass:
return dynamic_cast<KWalletFolderItem *>(item->parent()->parent()); return dynamic_cast<TDEWalletFolderItem *>(item->parent()->parent());
} }
return 0; return 0;
} }
/**************** /****************
* KWalletIconDrag - Stores the data for wallet drags * TDEWalletIconDrag - Stores the data for wallet drags
*/ */
class KWalletIconDrag : public TQIconDrag { class TDEWalletIconDrag : public TQIconDrag {
public: public:
KWalletIconDrag(TQWidget *dragSource, const char *name = 0L) TDEWalletIconDrag(TQWidget *dragSource, const char *name = 0L)
: TQIconDrag(dragSource, name) { : TQIconDrag(dragSource, name) {
} }
virtual ~KWalletIconDrag() {} virtual ~TDEWalletIconDrag() {}
virtual const char *format(int i = 0) const { virtual const char *format(int i = 0) const {
if (i == 0) { if (i == 0) {
@ -616,18 +616,18 @@ class KWalletIconDrag : public TQIconDrag {
}; };
/**************** /****************
* * KWalletIconView - An iconview to store wallets * * TDEWalletIconView - An iconview to store wallets
* */ * */
KWalletIconView::KWalletIconView(TQWidget *parent, const char *name) TDEWalletIconView::TDEWalletIconView(TQWidget *parent, const char *name)
: TDEIconView(parent, name) { : TDEIconView(parent, name) {
TDEGlobal::dirs()->addResourceType("tdewallet", "share/apps/tdewallet"); TDEGlobal::dirs()->addResourceType("tdewallet", "share/apps/tdewallet");
connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), TQT_SLOT(slotDropped(TQDropEvent*, const TQValueList<TQIconDragItem>&))); connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), TQT_SLOT(slotDropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)));
} }
KWalletIconView::~KWalletIconView() { TDEWalletIconView::~TDEWalletIconView() {
} }
void KWalletIconView::slotDropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& /*lst*/) { void TDEWalletIconView::slotDropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& /*lst*/) {
if (e->source() == viewport()) { if (e->source() == viewport()) {
e->ignore(); e->ignore();
return; return;
@ -666,7 +666,7 @@ void KWalletIconView::slotDropped(TQDropEvent *e, const TQValueList<TQIconDragIt
e->accept(); e->accept();
} }
void KWalletIconView::contentsMousePressEvent(TQMouseEvent *e) { void TDEWalletIconView::contentsMousePressEvent(TQMouseEvent *e) {
_mousePos = e->pos(); _mousePos = e->pos();
if (!findItem(_mousePos)) { if (!findItem(_mousePos)) {
clearSelection(); clearSelection();
@ -674,8 +674,8 @@ void KWalletIconView::contentsMousePressEvent(TQMouseEvent *e) {
TDEIconView::contentsMousePressEvent( e ); TDEIconView::contentsMousePressEvent( e );
} }
TQDragObject *KWalletIconView::dragObject() { TQDragObject *TDEWalletIconView::dragObject() {
KWalletIconDrag* id = new KWalletIconDrag(viewport(), "KWallet Drag"); TDEWalletIconDrag* id = new TDEWalletIconDrag(viewport(), "TDEWallet Drag");
TQString path = "file:" + TDEGlobal::dirs()->saveLocation("tdewallet"); TQString path = "file:" + TDEGlobal::dirs()->saveLocation("tdewallet");
TQPoint pos = _mousePos; TQPoint pos = _mousePos;
for (TQIconViewItem *item = firstItem(); item; item = item->nextItem()) { for (TQIconViewItem *item = firstItem(); item; item = item->nextItem()) {
@ -698,28 +698,28 @@ TQDragObject *KWalletIconView::dragObject() {
return id; return id;
} }
TQDragObject *KWalletEntryList::dragObject() { TQDragObject *TDEWalletEntryList::dragObject() {
TQListViewItem *i = currentItem(); TQListViewItem *i = currentItem();
TQStoredDrag *sd = 0L; TQStoredDrag *sd = 0L;
if (i->rtti() == KWalletEntryItemClass) { if (i->rtti() == TDEWalletEntryItemClass) {
KWalletEntryItem *ei = dynamic_cast<KWalletEntryItem*>(i); TDEWalletEntryItem *ei = dynamic_cast<TDEWalletEntryItem*>(i);
if (!ei) { if (!ei) {
return 0L; return 0L;
} }
sd = new KWalletEntryDrag(viewport(), "KWallet Entry Drag"); sd = new TDEWalletEntryDrag(viewport(), "TDEWallet Entry Drag");
TQByteArray a; TQByteArray a;
TQDataStream ds(a, IO_WriteOnly); TQDataStream ds(a, IO_WriteOnly);
ds << KWALLETENTRYMAGIC; ds << KWALLETENTRYMAGIC;
ds << *ei; ds << *ei;
sd->setEncodedData(a); sd->setEncodedData(a);
} else if (i->rtti() == KWalletFolderItemClass) { } else if (i->rtti() == TDEWalletFolderItemClass) {
KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem*>(i); TDEWalletFolderItem *fi = dynamic_cast<TDEWalletFolderItem*>(i);
if (!fi) { if (!fi) {
return 0L; return 0L;
} }
sd = new KWalletFolderDrag(viewport(), "KWallet Folder Drag"); sd = new TDEWalletFolderDrag(viewport(), "TDEWallet Folder Drag");
TQByteArray a; TQByteArray a;
TQDataStream ds(a, IO_WriteOnly); TQDataStream ds(a, IO_WriteOnly);

@ -30,17 +30,17 @@
#define KWALLETENTRYMAGIC ((TQ_UINT32) 0x6B776C65) #define KWALLETENTRYMAGIC ((TQ_UINT32) 0x6B776C65)
#define KWALLETFOLDERMAGIC ((TQ_UINT32) 0x6B776C66) #define KWALLETFOLDERMAGIC ((TQ_UINT32) 0x6B776C66)
enum KWalletListItemClasses { enum TDEWalletListItemClasses {
KWalletFolderItemClass = 1000, TDEWalletFolderItemClass = 1000,
KWalletContainerItemClass, TDEWalletContainerItemClass,
KWalletEntryItemClass, TDEWalletEntryItemClass,
KWalletUnknownClass = 2000 TDEWalletUnknownClass = 2000
}; };
class KWalletEntryItem : public TDEListViewItem { class TDEWalletEntryItem : public TDEListViewItem {
public: public:
KWalletEntryItem(KWallet::Wallet *w, TQListViewItem* parent, const TQString& ename); TDEWalletEntryItem(TDEWallet::Wallet *w, TQListViewItem* parent, const TQString& ename);
virtual ~KWalletEntryItem(); virtual ~TDEWalletEntryItem();
const TQString& oldName() { return _oldName; } const TQString& oldName() { return _oldName; }
TQString currentName() { return text(0); } TQString currentName() { return text(0); }
@ -49,64 +49,64 @@ class KWalletEntryItem : public TDEListViewItem {
virtual int rtti() const; virtual int rtti() const;
public: public:
KWallet::Wallet *_wallet; TDEWallet::Wallet *_wallet;
private: private:
TQString _oldName; TQString _oldName;
}; };
class KWalletContainerItem : public TDEListViewItem { class TDEWalletContainerItem : public TDEListViewItem {
public: public:
KWalletContainerItem(TQListViewItem* parent, const TQString& name, TDEWalletContainerItem(TQListViewItem* parent, const TQString& name,
KWallet::Wallet::EntryType type); TDEWallet::Wallet::EntryType type);
virtual ~KWalletContainerItem(); virtual ~TDEWalletContainerItem();
public: public:
virtual int rtti() const; virtual int rtti() const;
KWallet::Wallet::EntryType type(); TDEWallet::Wallet::EntryType type();
bool contains(const TQString& itemKey); bool contains(const TQString& itemKey);
TQListViewItem* getItem(const TQString& itemKey); TQListViewItem* getItem(const TQString& itemKey);
private: private:
KWallet::Wallet::EntryType _type; TDEWallet::Wallet::EntryType _type;
}; };
class KWalletFolderItem : public TDEListViewItem { class TDEWalletFolderItem : public TDEListViewItem {
public: public:
KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, TDEWalletFolderItem(TDEWallet::Wallet *w, TQListView* parent,
const TQString& name, int entries); const TQString& name, int entries);
virtual ~KWalletFolderItem(); virtual ~TDEWalletFolderItem();
virtual bool acceptDrop(const TQMimeSource *mime) const; virtual bool acceptDrop(const TQMimeSource *mime) const;
virtual int rtti() const; virtual int rtti() const;
TQString name() const; TQString name() const;
void refresh(); void refresh();
KWalletContainerItem* getContainer(KWallet::Wallet::EntryType type); TDEWalletContainerItem* getContainer(TDEWallet::Wallet::EntryType type);
TQPixmap getFolderIcon(TDEIcon::Group group); TQPixmap getFolderIcon(TDEIcon::Group group);
bool contains(const TQString& itemKey); bool contains(const TQString& itemKey);
TQListViewItem* getItem(const TQString& itemKey); TQListViewItem* getItem(const TQString& itemKey);
public: public:
KWallet::Wallet *_wallet; TDEWallet::Wallet *_wallet;
private: private:
TQString _name; TQString _name;
int _entries; int _entries;
}; };
class KWalletEntryList : public TDEListView { class TDEWalletEntryList : public TDEListView {
Q_OBJECT Q_OBJECT
public: public:
KWalletEntryList(TQWidget *parent, const char *name = 0L); TDEWalletEntryList(TQWidget *parent, const char *name = 0L);
virtual ~KWalletEntryList(); virtual ~TDEWalletEntryList();
bool existsFolder(const TQString& name); bool existsFolder(const TQString& name);
KWalletFolderItem* getFolder(const TQString& name); TDEWalletFolderItem* getFolder(const TQString& name);
void contentsDropEvent(TQDropEvent *e); void contentsDropEvent(TQDropEvent *e);
void contentsDragEnterEvent(TQDragEnterEvent *e); void contentsDragEnterEvent(TQDragEnterEvent *e);
void setWallet(KWallet::Wallet *w); void setWallet(TDEWallet::Wallet *w);
protected: protected:
void itemDropped(TQDropEvent *e, TQListViewItem *item); void itemDropped(TQDropEvent *e, TQListViewItem *item);
@ -114,16 +114,16 @@ class KWalletEntryList : public TDEListView {
virtual bool acceptDrag (TQDropEvent* event) const; virtual bool acceptDrag (TQDropEvent* event) const;
private: private:
static KWalletFolderItem *getItemFolder(TQListViewItem *item); static TDEWalletFolderItem *getItemFolder(TQListViewItem *item);
public: public:
KWallet::Wallet *_wallet; TDEWallet::Wallet *_wallet;
}; };
class KWalletItem : public TQIconViewItem { class TDEWalletItem : public TQIconViewItem {
public: public:
KWalletItem(TQIconView *parent, const TQString& walletName); TDEWalletItem(TQIconView *parent, const TQString& walletName);
virtual ~KWalletItem(); virtual ~TDEWalletItem();
virtual bool acceptDrop(const TQMimeSource *mime) const; virtual bool acceptDrop(const TQMimeSource *mime) const;
@ -132,12 +132,12 @@ class KWalletItem : public TQIconViewItem {
}; };
class KWalletIconView : public TDEIconView { class TDEWalletIconView : public TDEIconView {
Q_OBJECT Q_OBJECT
public: public:
KWalletIconView(TQWidget *parent, const char *name = 0L); TDEWalletIconView(TQWidget *parent, const char *name = 0L);
virtual ~KWalletIconView(); virtual ~TDEWalletIconView();
protected slots: protected slots:
virtual void slotDropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst); virtual void slotDropped(TQDropEvent *e, const TQValueList<TQIconDragItem>& lst);
@ -149,10 +149,10 @@ class KWalletIconView : public TDEIconView {
}; };
inline TQDataStream& operator<<(TQDataStream& str, const KWalletEntryItem& w) { inline TQDataStream& operator<<(TQDataStream& str, const TDEWalletEntryItem& w) {
TQString name = w.text(0); TQString name = w.text(0);
str << name; str << name;
KWallet::Wallet::EntryType et = w._wallet->entryType(name); TDEWallet::Wallet::EntryType et = w._wallet->entryType(name);
str << long(et); str << long(et);
TQByteArray a; TQByteArray a;
w._wallet->readEntry(name, a); w._wallet->readEntry(name, a);
@ -160,14 +160,14 @@ inline TQDataStream& operator<<(TQDataStream& str, const KWalletEntryItem& w) {
return str; return str;
} }
inline TQDataStream& operator<<(TQDataStream& str, const KWalletFolderItem& w) { inline TQDataStream& operator<<(TQDataStream& str, const TDEWalletFolderItem& w) {
TQString oldFolder = w._wallet->currentFolder(); TQString oldFolder = w._wallet->currentFolder();
str << w.name(); str << w.name();
w._wallet->setFolder(w.name()); w._wallet->setFolder(w.name());
TQStringList entries = w._wallet->entryList(); TQStringList entries = w._wallet->entryList();
for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
str << *it; str << *it;
KWallet::Wallet::EntryType et = w._wallet->entryType(*it); TDEWallet::Wallet::EntryType et = w._wallet->entryType(*it);
str << long(et); str << long(et);
TQByteArray a; TQByteArray a;
w._wallet->readEntry(*it, a); w._wallet->readEntry(*it, a);

@ -37,11 +37,11 @@
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqspinbox.h> #include <tqspinbox.h>
typedef KGenericFactory<KWalletConfig, TQWidget> KWalletFactory; typedef KGenericFactory<TDEWalletConfig, TQWidget> TDEWalletFactory;
K_EXPORT_COMPONENT_FACTORY(kcm_tdewallet, KWalletFactory("kcmtdewallet")) K_EXPORT_COMPONENT_FACTORY(kcm_tdewallet, TDEWalletFactory("kcmtdewallet"))
KWalletConfig::KWalletConfig(TQWidget *parent, const char *name, const TQStringList&) TDEWalletConfig::TDEWalletConfig(TQWidget *parent, const char *name, const TQStringList&)
: TDECModule(KWalletFactory::instance(), parent, name) { : TDECModule(TDEWalletFactory::instance(), parent, name) {
TDEAboutData *about = TDEAboutData *about =
new TDEAboutData(I18N_NOOP("kcmtdewallet"), new TDEAboutData(I18N_NOOP("kcmtdewallet"),
@ -83,13 +83,13 @@ KWalletConfig::KWalletConfig(TQWidget *parent, const char *name, const TQStringL
} }
KWalletConfig::~KWalletConfig() { TDEWalletConfig::~TDEWalletConfig() {
delete _cfg; delete _cfg;
_cfg = 0L; _cfg = 0L;
} }
void KWalletConfig::updateWalletLists() { void TDEWalletConfig::updateWalletLists() {
TQString p1, p2; TQString p1, p2;
p1 = _wcw->_localWallet->currentText(); p1 = _wcw->_localWallet->currentText();
p2 = _wcw->_defaultWallet->currentText(); p2 = _wcw->_defaultWallet->currentText();
@ -97,7 +97,7 @@ void KWalletConfig::updateWalletLists() {
_wcw->_localWallet->clear(); _wcw->_localWallet->clear();
_wcw->_defaultWallet->clear(); _wcw->_defaultWallet->clear();
TQStringList wl = KWallet::Wallet::walletList(); TQStringList wl = TDEWallet::Wallet::walletList();
_wcw->_localWallet->insertStringList(wl); _wcw->_localWallet->insertStringList(wl);
_wcw->_defaultWallet->insertStringList(wl); _wcw->_defaultWallet->insertStringList(wl);
@ -111,7 +111,7 @@ void KWalletConfig::updateWalletLists() {
} }
TQString KWalletConfig::newWallet() { TQString TDEWalletConfig::newWallet() {
bool ok; bool ok;
TQString n = KInputDialog::getText(i18n("New Wallet"), TQString n = KInputDialog::getText(i18n("New Wallet"),
@ -124,7 +124,7 @@ TQString KWalletConfig::newWallet() {
return TQString(); return TQString();
} }
KWallet::Wallet *w = KWallet::Wallet::openWallet(n); TDEWallet::Wallet *w = TDEWallet::Wallet::openWallet(n);
if (!w) { if (!w) {
return TQString(); return TQString();
} }
@ -134,7 +134,7 @@ TQString KWalletConfig::newWallet() {
} }
void KWalletConfig::newLocalWallet() { void TDEWalletConfig::newLocalWallet() {
TQString n = newWallet(); TQString n = newWallet();
if (n.isEmpty()) { if (n.isEmpty()) {
return; return;
@ -148,7 +148,7 @@ void KWalletConfig::newLocalWallet() {
} }
void KWalletConfig::newNetworkWallet() { void TDEWalletConfig::newNetworkWallet() {
TQString n = newWallet(); TQString n = newWallet();
if (n.isEmpty()) { if (n.isEmpty()) {
return; return;
@ -162,7 +162,7 @@ void KWalletConfig::newNetworkWallet() {
} }
void KWalletConfig::launchManager() { void TDEWalletConfig::launchManager() {
if (!DCOPClient::mainClient()->isApplicationRegistered("tdewalletmanager")) { if (!DCOPClient::mainClient()->isApplicationRegistered("tdewalletmanager")) {
TDEApplication::startServiceByDesktopName("tdewalletmanager_show"); TDEApplication::startServiceByDesktopName("tdewalletmanager_show");
} else { } else {
@ -173,15 +173,15 @@ void KWalletConfig::launchManager() {
} }
void KWalletConfig::configChanged() { void TDEWalletConfig::configChanged() {
emit changed(true); emit changed(true);
} }
void KWalletConfig::load() { void TDEWalletConfig::load() {
load( false ); load( false );
} }
void KWalletConfig::load(bool useDefaults) { void TDEWalletConfig::load(bool useDefaults) {
TDEConfigGroup config(_cfg, "Wallet"); TDEConfigGroup config(_cfg, "Wallet");
config.setReadDefaults( useDefaults ); config.setReadDefaults( useDefaults );
_wcw->_enabled->setChecked(config.readBoolEntry("Enabled", true)); _wcw->_enabled->setChecked(config.readBoolEntry("Enabled", true));
@ -234,7 +234,7 @@ void KWalletConfig::load(bool useDefaults) {
} }
void KWalletConfig::save() { void TDEWalletConfig::save() {
TDEConfigGroup config(_cfg, "Wallet"); TDEConfigGroup config(_cfg, "Wallet");
config.writeEntry("Enabled", _wcw->_enabled->isChecked()); config.writeEntry("Enabled", _wcw->_enabled->isChecked());
config.writeEntry("Launch Manager", _wcw->_launchManager->isChecked()); config.writeEntry("Launch Manager", _wcw->_launchManager->isChecked());
@ -290,17 +290,17 @@ void KWalletConfig::save() {
} }
void KWalletConfig::defaults() { void TDEWalletConfig::defaults() {
load( true ); load( true );
} }
TQString KWalletConfig::quickHelp() const { TQString TDEWalletConfig::quickHelp() const {
return i18n("This configuration module allows you to configure the KDE wallet system."); return i18n("This configuration module allows you to configure the KDE wallet system.");
} }
void KWalletConfig::contextMenuRequested(TQListViewItem *item, const TQPoint& pos, int col) { void TDEWalletConfig::contextMenuRequested(TQListViewItem *item, const TQPoint& pos, int col) {
Q_UNUSED(col) Q_UNUSED(col)
if (item && item->parent()) { if (item && item->parent()) {
TDEPopupMenu *m = new TDEPopupMenu(this); TDEPopupMenu *m = new TDEPopupMenu(this);
@ -311,7 +311,7 @@ void KWalletConfig::contextMenuRequested(TQListViewItem *item, const TQPoint& po
} }
void KWalletConfig::deleteEntry() { void TDEWalletConfig::deleteEntry() {
TQListViewItem *item = _wcw->_accessList->selectedItem(); TQListViewItem *item = _wcw->_accessList->selectedItem();
if (item) { if (item) {
delete item; delete item;

@ -26,12 +26,12 @@ class TDEConfig;
class WalletConfigWidget; class WalletConfigWidget;
class TQListViewItem; class TQListViewItem;
class KWalletConfig : public TDECModule { class TDEWalletConfig : public TDECModule {
Q_OBJECT Q_OBJECT
public: public:
KWalletConfig(TQWidget *parent = 0L, const char *name = 0L, const TQStringList& = TQStringList()); TDEWalletConfig(TQWidget *parent = 0L, const char *name = 0L, const TQStringList& = TQStringList());
virtual ~KWalletConfig(); virtual ~TDEWalletConfig();
void load(); void load();
void load( bool useDefaults ); void load( bool useDefaults );

@ -58,7 +58,7 @@ Comment[ca]=Configuració de carteres TDE
Comment[cs]=Nastavení úschovny TDE Comment[cs]=Nastavení úschovny TDE
Comment[cy]=Ffurfweddiad Waled TDE Comment[cy]=Ffurfweddiad Waled TDE
Comment[da]=TDE's indstilling af tegnebog Comment[da]=TDE's indstilling af tegnebog
Comment[de]=Einrichten der "digitalen Brieftasche" (KWallet) Comment[de]=Einrichten der "digitalen Brieftasche" (TDEWallet)
Comment[el]=Ρύθμιση του πορτοφολιού του TDE Comment[el]=Ρύθμιση του πορτοφολιού του TDE
Comment[es]=Configuración de la cartera de TDE Comment[es]=Configuración de la cartera de TDE
Comment[et]=TDE turvalaeka seadistamine Comment[et]=TDE turvalaeka seadistamine
@ -97,7 +97,7 @@ Comment[sv]=Inställning av TDE-plånbok
Comment[ta]=கேடிஇ வாலட் வடிவமைப்பு Comment[ta]=கேடிஇ வாலட் வடிவமைப்பு
Comment[tg]=TDE Танзими Ҳамён Comment[tg]=TDE Танзими Ҳамён
Comment[tr]=TDE Cüzdan Ayarı Comment[tr]=TDE Cüzdan Ayarı
Comment[uk]=Налаштування KWallet Comment[uk]=Налаштування TDEWallet
Comment[uz]=TDE qopchiq xizmatini moslash Comment[uz]=TDE qopchiq xizmatini moslash
Comment[uz@cyrillic]=TDE қопчиқ хизматини мослаш Comment[uz@cyrillic]=TDE қопчиқ хизматини мослаш
Comment[zh_CN]=TDE 钱包配置 Comment[zh_CN]=TDE 钱包配置

@ -39,7 +39,7 @@ Name[pt]=Ferramenta de Gestão da Carteira
Name[pt_BR]=Ferramenta de Gerenciamento da Carteira Name[pt_BR]=Ferramenta de Gerenciamento da Carteira
Name[ro]=Administrare portofel Name[ro]=Administrare portofel
Name[ru]=Управление паролями Name[ru]=Управление паролями
Name[sk]=Nástroj na správu KWallet Name[sk]=Nástroj na správu TDEWallet
Name[sl]=Orodje za upravljanje z listnicami Name[sl]=Orodje za upravljanje z listnicami
Name[sr]=Алат за управљање новчаником Name[sr]=Алат за управљање новчаником
Name[sr@Latn]=Alat za upravljanje novčanikom Name[sr@Latn]=Alat za upravljanje novčanikom

@ -66,7 +66,7 @@ int main(int argc, char **argv) {
MyApp a; MyApp a;
KWalletManager wm; TDEWalletManager wm;
wm.setCaption(i18n("TDE Wallet Manager")); wm.setCaption(i18n("TDE Wallet Manager"));
a.setMainWidget(&wm); a.setMainWidget(&wm);

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

@ -30,17 +30,17 @@ class TDEAction;
class TQIconViewItem; class TQIconViewItem;
class TQListViewItem; class TQListViewItem;
class TQCheckBox; class TQCheckBox;
class KWalletFolderIconView; class TDEWalletFolderIconView;
class KWalletEntryList; class TDEWalletEntryList;
class KWMapEditor; class KWMapEditor;
class KWalletEditor : public TDEMainWindow { class TDEWalletEditor : public TDEMainWindow {
Q_OBJECT Q_OBJECT
public: public:
KWalletEditor(const TQString& wallet, bool isPath, TQWidget *parent = 0, const char* name = 0); TDEWalletEditor(const TQString& wallet, bool isPath, TQWidget *parent = 0, const char* name = 0);
virtual ~KWalletEditor(); virtual ~TDEWalletEditor();
bool isOpen() const { return _w != 0L; } bool isOpen() const { return _w != 0L; }
@ -92,9 +92,9 @@ class KWalletEditor : public TDEMainWindow {
private: private:
void createActions(); void createActions();
bool _nonLocal; bool _nonLocal;
KWallet::Wallet *_w; TDEWallet::Wallet *_w;
WalletWidget *_ww; WalletWidget *_ww;
KWalletEntryList *_entryList; TDEWalletEntryList *_entryList;
bool _walletIsOpen; bool _walletIsOpen;
TDEAction *_newFolderAction, *_deleteFolderAction; TDEAction *_newFolderAction, *_deleteFolderAction;
TDEAction *_passwordAction, *_exportAction, *_saveAsAction, *_mergeAction, *_importAction; TDEAction *_passwordAction, *_exportAction, *_saveAsAction, *_mergeAction, *_importAction;

@ -39,7 +39,7 @@ Name[pt]=Ferramenta de Gestão da Carteira
Name[pt_BR]=Ferramenta de Gerenciamento da Carteira Name[pt_BR]=Ferramenta de Gerenciamento da Carteira
Name[ro]=Administrare portofel Name[ro]=Administrare portofel
Name[ru]=Управление паролями Name[ru]=Управление паролями
Name[sk]=Nástroj na správu KWallet Name[sk]=Nástroj na správu TDEWallet
Name[sl]=Orodje za upravljanje z listnicami Name[sl]=Orodje za upravljanje z listnicami
Name[sr]=Алат за управљање новчаником Name[sr]=Алат за управљање новчаником
Name[sr@Latn]=Alat za upravljanje novčanikom Name[sr@Latn]=Alat za upravljanje novčanikom

@ -46,8 +46,8 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tqtooltip.h> #include <tqtooltip.h>
KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f) TDEWalletManager::TDEWalletManager(TQWidget *parent, const char *name, WFlags f)
: TDEMainWindow(parent, name, f), DCOPObject("KWalletManager") { : TDEMainWindow(parent, name, f), DCOPObject("TDEWalletManager") {
TDEGlobal::dirs()->addResourceType("tdewallet", "share/apps/tdewallet"); TDEGlobal::dirs()->addResourceType("tdewallet", "share/apps/tdewallet");
_tdewalletdLaunch = false; _tdewalletdLaunch = false;
TQAccel *accel = new TQAccel(this, "tdewalletmanager"); TQAccel *accel = new TQAccel(this, "tdewalletmanager");
@ -62,10 +62,10 @@ KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f)
_tray->setPixmap(loadSystemTrayIcon("wallet_closed")); _tray->setPixmap(loadSystemTrayIcon("wallet_closed"));
TQToolTip::add(_tray, i18n("TDE Wallet: No wallets open.")); TQToolTip::add(_tray, i18n("TDE Wallet: No wallets open."));
connect(_tray, TQT_SIGNAL(quitSelected()), TQT_SLOT(shuttingDown())); connect(_tray, TQT_SIGNAL(quitSelected()), TQT_SLOT(shuttingDown()));
TQStringList wl = KWallet::Wallet::walletList(); TQStringList wl = TDEWallet::Wallet::walletList();
bool isOpen = false; bool isOpen = false;
for (TQStringList::Iterator it = wl.begin(); it != wl.end(); ++it) { for (TQStringList::Iterator it = wl.begin(); it != wl.end(); ++it) {
if (KWallet::Wallet::isOpen(*it)) { if (TDEWallet::Wallet::isOpen(*it)) {
_tray->setPixmap(loadSystemTrayIcon("wallet_open")); _tray->setPixmap(loadSystemTrayIcon("wallet_open"));
TQToolTip::remove(_tray); TQToolTip::remove(_tray);
TQToolTip::add(_tray, i18n("TDE Wallet: A wallet is open.")); TQToolTip::add(_tray, i18n("TDE Wallet: A wallet is open."));
@ -83,7 +83,7 @@ KWalletManager::KWalletManager(TQWidget *parent, const char *name, WFlags f)
_tray = 0L; _tray = 0L;
} }
_iconView = new KWalletIconView(this, "tdewalletmanager icon view"); _iconView = new TDEWalletIconView(this, "tdewalletmanager icon view");
connect(_iconView, TQT_SIGNAL(executed(TQIconViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(openWallet(TQIconViewItem*))); connect(_iconView, TQT_SIGNAL(executed(TQIconViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(openWallet(TQIconViewItem*)));
connect(_iconView, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(contextMenu(TQIconViewItem*, const TQPoint&))); connect(_iconView, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(contextMenu(TQIconViewItem*, const TQPoint&)));
@ -145,19 +145,19 @@ actionCollection());
} }
KWalletManager::~KWalletManager() { TDEWalletManager::~TDEWalletManager() {
_tray = 0L; _tray = 0L;
delete _dcopRef; delete _dcopRef;
_dcopRef = 0L; _dcopRef = 0L;
} }
void KWalletManager::tdewalletdLaunch() { void TDEWalletManager::tdewalletdLaunch() {
_tdewalletdLaunch = true; _tdewalletdLaunch = true;
} }
bool KWalletManager::queryClose() { bool TDEWalletManager::queryClose() {
if (!_shuttingDown && !kapp->sessionSaving()) { if (!_shuttingDown && !kapp->sessionSaving()) {
if (!_tray) { if (!_tray) {
kapp->quit(); kapp->quit();
@ -170,7 +170,7 @@ bool KWalletManager::queryClose() {
} }
void KWalletManager::aWalletWasOpened() { void TDEWalletManager::aWalletWasOpened() {
if (_tray) { if (_tray) {
_tray->setPixmap(loadSystemTrayIcon("wallet_open")); _tray->setPixmap(loadSystemTrayIcon("wallet_open"));
TQToolTip::remove(_tray); TQToolTip::remove(_tray);
@ -180,8 +180,8 @@ void KWalletManager::aWalletWasOpened() {
} }
void KWalletManager::updateWalletDisplay() { void TDEWalletManager::updateWalletDisplay() {
TQStringList wl = KWallet::Wallet::walletList(); TQStringList wl = TDEWallet::Wallet::walletList();
TQPtrStack<TQIconViewItem> trash; TQPtrStack<TQIconViewItem> trash;
for (TQIconViewItem *item = _iconView->firstItem(); item; item = item->nextItem()) { for (TQIconViewItem *item = _iconView->firstItem(); item; item = item->nextItem()) {
@ -195,9 +195,9 @@ TQPtrStack<TQIconViewItem> trash;
for (TQStringList::Iterator i = wl.begin(); i != wl.end(); ++i) { for (TQStringList::Iterator i = wl.begin(); i != wl.end(); ++i) {
if (!_iconView->findItem(*i)) { if (!_iconView->findItem(*i)) {
// FIXME: if KWallet::Wallet::isOpen(*i) then show // FIXME: if TDEWallet::Wallet::isOpen(*i) then show
// a different icon! // a different icon!
new KWalletItem(_iconView, *i); new TDEWalletItem(_iconView, *i);
} else { } else {
// FIXME: See if icon needs to be updated // FIXME: See if icon needs to be updated
} }
@ -205,9 +205,9 @@ TQPtrStack<TQIconViewItem> trash;
} }
void KWalletManager::contextMenu(TQIconViewItem *item, const TQPoint& pos) { void TDEWalletManager::contextMenu(TQIconViewItem *item, const TQPoint& pos) {
if (item) { if (item) {
TQGuardedPtr<KWalletPopup> popupMenu = new KWalletPopup(item->text(), this); TQGuardedPtr<TDEWalletPopup> popupMenu = new TDEWalletPopup(item->text(), this);
connect(popupMenu, TQT_SIGNAL(walletOpened(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(openWallet(const TQString&))); connect(popupMenu, TQT_SIGNAL(walletOpened(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(openWallet(const TQString&)));
connect(popupMenu, TQT_SIGNAL(walletClosed(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(closeWallet(const TQString&))); connect(popupMenu, TQT_SIGNAL(walletClosed(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(closeWallet(const TQString&)));
connect(popupMenu, TQT_SIGNAL(walletDeleted(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(deleteWallet(const TQString&))); connect(popupMenu, TQT_SIGNAL(walletDeleted(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(deleteWallet(const TQString&)));
@ -219,12 +219,12 @@ void KWalletManager::contextMenu(TQIconViewItem *item, const TQPoint& pos) {
} }
void KWalletManager::deleteWallet(const TQString& walletName) { void TDEWalletManager::deleteWallet(const TQString& walletName) {
int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?").arg(walletName),"",KStdGuiItem::del()); int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?").arg(walletName),"",KStdGuiItem::del());
if (rc != KMessageBox::Continue) { if (rc != KMessageBox::Continue) {
return; return;
} }
rc = KWallet::Wallet::deleteWallet(walletName); rc = TDEWallet::Wallet::deleteWallet(walletName);
if (rc != 0) { if (rc != 0) {
KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.").arg(rc)); KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.").arg(rc));
} }
@ -232,12 +232,12 @@ void KWalletManager::deleteWallet(const TQString& walletName) {
} }
void KWalletManager::closeWallet(const TQString& walletName) { void TDEWalletManager::closeWallet(const TQString& walletName) {
int rc = KWallet::Wallet::closeWallet(walletName, false); int rc = TDEWallet::Wallet::closeWallet(walletName, false);
if (rc != 0) { if (rc != 0) {
rc = KMessageBox::warningYesNo(this, i18n("Unable to close wallet cleanly. It is probably in use by other applications. Do you wish to force it closed?"), TQString(), i18n("Force Closure"), i18n("Do Not Force")); rc = KMessageBox::warningYesNo(this, i18n("Unable to close wallet cleanly. It is probably in use by other applications. Do you wish to force it closed?"), TQString(), i18n("Force Closure"), i18n("Do Not Force"));
if (rc == KMessageBox::Yes) { if (rc == KMessageBox::Yes) {
rc = KWallet::Wallet::closeWallet(walletName, true); rc = TDEWallet::Wallet::closeWallet(walletName, true);
if (rc != 0) { if (rc != 0) {
KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.").arg(rc)); KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.").arg(rc));
} }
@ -248,13 +248,13 @@ void KWalletManager::closeWallet(const TQString& walletName) {
} }
void KWalletManager::changeWalletPassword(const TQString& walletName) { void TDEWalletManager::changeWalletPassword(const TQString& walletName) {
KWallet::Wallet::changePassword(walletName); TDEWallet::Wallet::changePassword(walletName);
} }
void KWalletManager::openWalletFile(const TQString& path) { void TDEWalletManager::openWalletFile(const TQString& path) {
KWalletEditor *we = new KWalletEditor(path, true, this, "Wallet Editor"); TDEWalletEditor *we = new TDEWalletEditor(path, true, this, "Wallet Editor");
if (we->isOpen()) { if (we->isOpen()) {
connect(we, TQT_SIGNAL(editorClosed(TDEMainWindow*)), connect(we, TQT_SIGNAL(editorClosed(TDEMainWindow*)),
this, TQT_SLOT(editorClosed(TDEMainWindow*))); this, TQT_SLOT(editorClosed(TDEMainWindow*)));
@ -266,12 +266,12 @@ void KWalletManager::openWalletFile(const TQString& path) {
} }
void KWalletManager::openWallet() { void TDEWalletManager::openWallet() {
TQIconViewItem *item = _iconView->currentItem(); TQIconViewItem *item = _iconView->currentItem();
openWallet(item); openWallet(item);
} }
void KWalletManager::deleteWallet() { void TDEWalletManager::deleteWallet() {
TQIconViewItem *item = _iconView->currentItem(); TQIconViewItem *item = _iconView->currentItem();
if (item) { if (item) {
deleteWallet(item->text()); deleteWallet(item->text());
@ -279,22 +279,22 @@ void KWalletManager::deleteWallet() {
} }
void KWalletManager::openWallet(const TQString& walletName) { void TDEWalletManager::openWallet(const TQString& walletName) {
openWallet(walletName, false); openWallet(walletName, false);
} }
void KWalletManager::openWallet(const TQString& walletName, bool newWallet) { void TDEWalletManager::openWallet(const TQString& walletName, bool newWallet) {
// Don't allow a wallet to open in two windows // Don't allow a wallet to open in two windows
for (TDEMainWindow *w = _windows.first(); w; w = _windows.next()) { for (TDEMainWindow *w = _windows.first(); w; w = _windows.next()) {
KWalletEditor *e = static_cast<KWalletEditor*>(w); TDEWalletEditor *e = static_cast<TDEWalletEditor*>(w);
if (e->isOpen() && e->_walletName == walletName) { if (e->isOpen() && e->_walletName == walletName) {
w->raise(); w->raise();
return; return;
} }
} }
KWalletEditor *we = new KWalletEditor(walletName, false, this, "Wallet Editor"); TDEWalletEditor *we = new TDEWalletEditor(walletName, false, this, "Wallet Editor");
we->setNewWallet(newWallet); we->setNewWallet(newWallet);
if (we->isOpen()) { if (we->isOpen()) {
connect(we, TQT_SIGNAL(editorClosed(TDEMainWindow*)), connect(we, TQT_SIGNAL(editorClosed(TDEMainWindow*)),
@ -308,14 +308,14 @@ void KWalletManager::openWallet(const TQString& walletName, bool newWallet) {
} }
void KWalletManager::openWallet(TQIconViewItem *item) { void TDEWalletManager::openWallet(TQIconViewItem *item) {
if (item) { if (item) {
openWallet(item->text()); openWallet(item->text());
} }
} }
void KWalletManager::allWalletsClosed() { void TDEWalletManager::allWalletsClosed() {
if (_tray) { if (_tray) {
_tray->setPixmap(loadSystemTrayIcon("wallet_closed")); _tray->setPixmap(loadSystemTrayIcon("wallet_closed"));
TQToolTip::remove(_tray); TQToolTip::remove(_tray);
@ -325,7 +325,7 @@ void KWalletManager::allWalletsClosed() {
} }
void KWalletManager::possiblyQuit() { void TDEWalletManager::possiblyQuit() {
TDEConfig cfg("tdewalletrc"); TDEConfig cfg("tdewalletrc");
cfg.setGroup("Wallet"); cfg.setGroup("Wallet");
if (_windows.isEmpty() && if (_windows.isEmpty() &&
@ -337,27 +337,27 @@ void KWalletManager::possiblyQuit() {
} }
void KWalletManager::editorClosed(TDEMainWindow* e) { void TDEWalletManager::editorClosed(TDEMainWindow* e) {
_windows.remove(e); _windows.remove(e);
} }
void KWalletManager::possiblyRescan(const TQCString& app) { void TDEWalletManager::possiblyRescan(const TQCString& app) {
if (app == "kded") { if (app == "kded") {
updateWalletDisplay(); updateWalletDisplay();
} }
} }
void KWalletManager::createWallet() { void TDEWalletManager::createWallet() {
TQString n; TQString n;
bool ok; bool ok;
// FIXME: support international names // FIXME: support international names
TQRegExp regexp("^[A-Za-z0-9]+[A-Za-z0-9_\\s\\-]*$"); TQRegExp regexp("^[A-Za-z0-9]+[A-Za-z0-9_\\s\\-]*$");
TQString txt = i18n("Please choose a name for the new wallet:"); TQString txt = i18n("Please choose a name for the new wallet:");
if (!KWallet::Wallet::isEnabled()) { if (!TDEWallet::Wallet::isEnabled()) {
// FIXME: KMessageBox::warningYesNo(this, i1_8n("KWallet is not enabled. Do you want to enable it?"), TQString(), i18n("Enable"), i18n("Keep Disabled")); // FIXME: KMessageBox::warningYesNo(this, i1_8n("TDEWallet is not enabled. Do you want to enable it?"), TQString(), i18n("Enable"), i18n("Keep Disabled"));
return; return;
} }
@ -392,23 +392,23 @@ void KWalletManager::createWallet() {
} }
void KWalletManager::shuttingDown() { void TDEWalletManager::shuttingDown() {
_shuttingDown = true; _shuttingDown = true;
kapp->quit(); kapp->quit();
} }
void KWalletManager::setupWallet() { void TDEWalletManager::setupWallet() {
TDEApplication::startServiceByDesktopName("tdewallet_config"); TDEApplication::startServiceByDesktopName("tdewallet_config");
} }
void KWalletManager::closeAllWallets() { void TDEWalletManager::closeAllWallets() {
_dcopRef->call("closeAllWallets"); _dcopRef->call("closeAllWallets");
} }
TQPixmap KWalletManager::loadSystemTrayIcon(const TQString &icon) { TQPixmap TDEWalletManager::loadSystemTrayIcon(const TQString &icon) {
#if KDE_IS_VERSION(3, 1, 90) #if KDE_IS_VERSION(3, 1, 90)
return KSystemTray::loadIcon(icon); return KSystemTray::loadIcon(icon);
#else #else

@ -39,7 +39,7 @@ Name[pt]=Ferramenta de Gestão da Carteira
Name[pt_BR]=Ferramenta de Gerenciamento da Carteira Name[pt_BR]=Ferramenta de Gerenciamento da Carteira
Name[ro]=Administrare portofel Name[ro]=Administrare portofel
Name[ru]=Управление паролями Name[ru]=Управление паролями
Name[sk]=Nástroj na správu KWallet Name[sk]=Nástroj na správu TDEWallet
Name[sl]=Orodje za upravljanje z listnicami Name[sl]=Orodje za upravljanje z listnicami
Name[sr]=Алат за управљање новчаником Name[sr]=Алат за управљање новчаником
Name[sr@Latn]=Alat za upravljanje novčanikom Name[sr@Latn]=Alat za upravljanje novčanikom

@ -25,19 +25,19 @@
#include <tqptrlist.h> #include <tqptrlist.h>
class KSystemTray; class KSystemTray;
class KWalletIconView; class TDEWalletIconView;
class TQIconViewItem; class TQIconViewItem;
class DCOPRef; class DCOPRef;
class KWalletManager : public TDEMainWindow, public DCOPObject { class TDEWalletManager : public TDEMainWindow, public DCOPObject {
Q_OBJECT Q_OBJECT
// //
K_DCOP K_DCOP
public: public:
KWalletManager(TQWidget *parent = 0, const char* name = 0, WFlags f = 0); TDEWalletManager(TQWidget *parent = 0, const char* name = 0, WFlags f = 0);
virtual ~KWalletManager(); virtual ~TDEWalletManager();
TQPixmap loadSystemTrayIcon(const TQString &icon); TQPixmap loadSystemTrayIcon(const TQString &icon);
@ -76,7 +76,7 @@ class KWalletManager : public TDEMainWindow, public DCOPObject {
private: private:
KSystemTray *_tray; KSystemTray *_tray;
bool _shuttingDown; bool _shuttingDown;
KWalletIconView *_iconView; TDEWalletIconView *_iconView;
DCOPRef *_dcopRef; DCOPRef *_dcopRef;
TQPtrList<TDEMainWindow> _windows; TQPtrList<TDEMainWindow> _windows;
bool _tdewalletdLaunch; bool _tdewalletdLaunch;

@ -28,7 +28,7 @@
#include <tdewallet.h> #include <tdewallet.h>
#include <kstdguiitem.h> #include <kstdguiitem.h>
KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char *name) TDEWalletPopup::TDEWalletPopup(const TQString& wallet, TQWidget *parent, const char *name)
: TDEPopupMenu(parent, name), _walletName(wallet) { : TDEPopupMenu(parent, name), _walletName(wallet) {
insertTitle(wallet); insertTitle(wallet);
TDEActionCollection *ac = new TDEActionCollection(this, "tdewallet context actions"); TDEActionCollection *ac = new TDEActionCollection(this, "tdewallet context actions");
@ -46,7 +46,7 @@ KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char
TQT_SLOT(changeWalletPassword()), ac, "wallet_password"); TQT_SLOT(changeWalletPassword()), ac, "wallet_password");
act->plug(this); act->plug(this);
TQStringList ul = KWallet::Wallet::users(wallet); TQStringList ul = TDEWallet::Wallet::users(wallet);
if (!ul.isEmpty()) { if (!ul.isEmpty()) {
TDEPopupMenu *pm = new TDEPopupMenu(this, "Disconnect Apps"); TDEPopupMenu *pm = new TDEPopupMenu(this, "Disconnect Apps");
int id = 7000; int id = 7000;
@ -64,7 +64,7 @@ KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char
TQT_SLOT(closeWallet()), ac, "wallet_close"); TQT_SLOT(closeWallet()), ac, "wallet_close");
// FIXME: let's track this inside the manager so we don't need a dcop // FIXME: let's track this inside the manager so we don't need a dcop
// roundtrip here. // roundtrip here.
act->setEnabled(KWallet::Wallet::isOpen(wallet)); act->setEnabled(TDEWallet::Wallet::isOpen(wallet));
act->plug(this); act->plug(this);
act = new TDEAction(i18n("&Delete"), 0, Key_Delete, TQT_TQOBJECT(this), act = new TDEAction(i18n("&Delete"), 0, Key_Delete, TQT_TQOBJECT(this),
@ -73,37 +73,37 @@ KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char
} }
KWalletPopup::~KWalletPopup() { TDEWalletPopup::~TDEWalletPopup() {
} }
void KWalletPopup::openWallet() { void TDEWalletPopup::openWallet() {
emit walletOpened(_walletName); emit walletOpened(_walletName);
} }
void KWalletPopup::deleteWallet() { void TDEWalletPopup::deleteWallet() {
emit walletDeleted(_walletName); emit walletDeleted(_walletName);
} }
void KWalletPopup::closeWallet() { void TDEWalletPopup::closeWallet() {
emit walletClosed(_walletName); emit walletClosed(_walletName);
} }
void KWalletPopup::changeWalletPassword() { void TDEWalletPopup::changeWalletPassword() {
emit walletChangePassword(_walletName); emit walletChangePassword(_walletName);
} }
void KWalletPopup::createWallet() { void TDEWalletPopup::createWallet() {
emit walletCreated(); emit walletCreated();
} }
void KWalletPopup::disconnectApp(int id) { void TDEWalletPopup::disconnectApp(int id) {
KWallet::Wallet::disconnectApplication(_walletName, _appMap[id].latin1()); TDEWallet::Wallet::disconnectApplication(_walletName, _appMap[id].latin1());
} }
#include "tdewalletpopup.moc" #include "tdewalletpopup.moc"

@ -24,13 +24,13 @@
#include <tqmap.h> #include <tqmap.h>
#include <tqstring.h> #include <tqstring.h>
class KWalletPopup : public TDEPopupMenu { class TDEWalletPopup : public TDEPopupMenu {
Q_OBJECT Q_OBJECT
public: public:
KWalletPopup(const TQString& wallet, TQWidget *parent = 0, const char* name = 0); TDEWalletPopup(const TQString& wallet, TQWidget *parent = 0, const char* name = 0);
virtual ~KWalletPopup(); virtual ~TDEWalletPopup();
public slots: public slots:
void openWallet(); void openWallet();

Loading…
Cancel
Save