diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:18:06 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-26 13:18:06 -0600 |
commit | 79fd2b2bbd9f842ce3c84c67e3314033a9cceea4 (patch) | |
tree | d6d2174614dc2384de6f77a930aaf3d06b276fae /kwallet/kwalletpopup.cpp | |
parent | c3e3301aba81e1c1771fa309941888a8b0fb59bc (diff) | |
download | tdeutils-79fd2b2bbd9f842ce3c84c67e3314033a9cceea4.tar.gz tdeutils-79fd2b2bbd9f842ce3c84c67e3314033a9cceea4.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'kwallet/kwalletpopup.cpp')
-rw-r--r-- | kwallet/kwalletpopup.cpp | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/kwallet/kwalletpopup.cpp b/kwallet/kwalletpopup.cpp deleted file mode 100644 index 032ec8a..0000000 --- a/kwallet/kwalletpopup.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2003 George Staikos <staikos@kde.org> - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - - -#include "kwalletpopup.h" - -#include <kaction.h> -#include <kdebug.h> -#include <kiconview.h> -#include <klocale.h> -#include <kmessagebox.h> -#include <kwallet.h> -#include <kstdguiitem.h> - -KWalletPopup::KWalletPopup(const TQString& wallet, TQWidget *parent, const char *name) -: KPopupMenu(parent, name), _walletName(wallet) { - insertTitle(wallet); - KActionCollection *ac = new KActionCollection(this, "kwallet context actions"); - KAction *act; - - act = new KAction(i18n("&New Wallet..."), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(createWallet()), ac, "wallet_create"); - act->plug(this); - - act = new KAction(i18n("&Open..."), 0, Key_Return, TQT_TQOBJECT(this), - TQT_SLOT(openWallet()), ac, "wallet_open"); - act->plug(this); - - act = new KAction(i18n("Change &Password..."), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(changeWalletPassword()), ac, "wallet_password"); - act->plug(this); - - TQStringList ul = KWallet::Wallet::users(wallet); - if (!ul.isEmpty()) { - KPopupMenu *pm = new KPopupMenu(this, "Disconnect Apps"); - int id = 7000; - for (TQStringList::Iterator it = ul.begin(); it != ul.end(); ++it) { - _appMap[id] = *it; - pm->insertItem(*it, this, TQT_SLOT(disconnectApp(int)), 0, id); - pm->setItemParameter(id, id); - id++; - } - - insertItem(i18n("Disconnec&t"), pm); - } - - act = KStdAction::close( TQT_TQOBJECT(this), - TQT_SLOT(closeWallet()), ac, "wallet_close"); - // FIXME: let's track this inside the manager so we don't need a dcop - // roundtrip here. - act->setEnabled(KWallet::Wallet::isOpen(wallet)); - act->plug(this); - - act = new KAction(i18n("&Delete"), 0, Key_Delete, TQT_TQOBJECT(this), - TQT_SLOT(deleteWallet()), ac, "wallet_delete"); - act->plug(this); -} - - -KWalletPopup::~KWalletPopup() { -} - - -void KWalletPopup::openWallet() { - emit walletOpened(_walletName); -} - - -void KWalletPopup::deleteWallet() { - emit walletDeleted(_walletName); -} - - -void KWalletPopup::closeWallet() { - emit walletClosed(_walletName); -} - - -void KWalletPopup::changeWalletPassword() { - emit walletChangePassword(_walletName); -} - - -void KWalletPopup::createWallet() { - emit walletCreated(); -} - - -void KWalletPopup::disconnectApp(int id) { - KWallet::Wallet::disconnectApplication(_walletName, _appMap[id].latin1()); -} - -#include "kwalletpopup.moc" - |