Rename KWallet to TDEWallet

pull/1/head
Timothy Pearson 11 years ago
parent 01fd5fb452
commit cce87d87ca

@ -57,7 +57,7 @@ public:
} }
/** Reference count */ /** Reference count */
int refCount; int refCount;
/** Group to use for TDEConfig and KWallet */ /** Group to use for TDEConfig and TDEWallet */
const TQString configGroup; const TQString configGroup;
/** Is the password being remembered? */ /** Is the password being remembered? */
bool remembered; bool remembered;
@ -92,10 +92,10 @@ public:
void begin() void begin()
{ {
kdDebug( 14010 ) << k_funcinfo << endl; kdDebug( 14010 ) << k_funcinfo << endl;
Kopete::WalletManager::self()->openWallet( this, TQT_SLOT( walletReceived( KWallet::Wallet* ) ) ); Kopete::WalletManager::self()->openWallet( this, TQT_SLOT( walletReceived( TDEWallet::Wallet* ) ) );
} }
void walletReceived( KWallet::Wallet *wallet ) void walletReceived( TDEWallet::Wallet *wallet )
{ {
kdDebug( 14010 ) << k_funcinfo << endl; kdDebug( 14010 ) << k_funcinfo << endl;
mWallet = wallet; mWallet = wallet;
@ -112,7 +112,7 @@ public:
protected: protected:
Kopete::Password mPassword; Kopete::Password mPassword;
KWallet::Wallet *mWallet; TDEWallet::Wallet *mWallet;
}; };
/** /**
@ -131,7 +131,7 @@ public:
TQString grabPassword() TQString grabPassword()
{ {
// Before trying to read from the wallet, check if the config file holds a password. // Before trying to read from the wallet, check if the config file holds a password.
// If so, remove it from the config and set it through KWallet instead. // If so, remove it from the config and set it through TDEWallet instead.
TQString pwd; TQString pwd;
if ( mPassword.d->remembered && !mPassword.d->passwordFromTDEConfig.isNull() ) if ( mPassword.d->remembered && !mPassword.d->passwordFromTDEConfig.isNull() )
{ {
@ -281,7 +281,7 @@ public:
return true; return true;
} }
if ( KWallet::Wallet::isEnabled() ) if ( TDEWallet::Wallet::isEnabled() )
{ {
// If we end up here, the wallet is enabled, but failed somehow. // If we end up here, the wallet is enabled, but failed somehow.
// Ask the user what to do now. // Ask the user what to do now.
@ -294,7 +294,7 @@ public:
"do you want to save the password in the <b>unsafe</b> configuration file instead?</qt>" ), "do you want to save the password in the <b>unsafe</b> configuration file instead?</qt>" ),
i18n( "Unable to Store Secure Password" ), i18n( "Unable to Store Secure Password" ),
KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ), KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ),
TQString::fromLatin1( "KWalletFallbackToTDEConfig" ) ) != KMessageBox::Continue ) TQString::fromLatin1( "TDEWalletFallbackToTDEConfig" ) ) != KMessageBox::Continue )
{ {
return false; return false;
} }

@ -20,7 +20,7 @@
#include <tqobject.h> #include <tqobject.h>
#include "kopete_export.h" #include "kopete_export.h"
namespace KWallet { class Wallet; } namespace TDEWallet { class Wallet; }
class TQPixmap; class TQPixmap;
@ -40,7 +40,7 @@ namespace Kopete
* The Kopete::Password object is responsible for storing and retrieving a * The Kopete::Password object is responsible for storing and retrieving a
* password for a plugin or account object. * password for a plugin or account object.
* *
* If the KWallet is active, passwords will be stored in it, otherwise, they * If the TDEWallet is active, passwords will be stored in it, otherwise, they
* will be stored in the TDEConfig, in a slightly mangled form. * will be stored in the TDEConfig, in a slightly mangled form.
*/ */
class KOPETE_EXPORT Password : public TQObject class KOPETE_EXPORT Password : public TQObject
@ -212,7 +212,7 @@ class KopetePasswordRequestBase : public virtual TQObject
signals: signals:
void requestFinished( const TQString &password ); void requestFinished( const TQString &password );
public slots: public slots:
virtual void walletReceived( KWallet::Wallet *wallet ) = 0; virtual void walletReceived( TDEWallet::Wallet *wallet ) = 0;
virtual void slotOkPressed() = 0; virtual void slotOkPressed() = 0;
virtual void slotCancelPressed() = 0; virtual void slotCancelPressed() = 0;
}; };

@ -39,7 +39,7 @@ public:
Private() : wallet(0), signal(0) {} Private() : wallet(0), signal(0) {}
~Private() { delete wallet; delete signal; } ~Private() { delete wallet; delete signal; }
KWallet::Wallet *wallet; TDEWallet::Wallet *wallet;
// we can't just connect every slot that wants the wallet to the // we can't just connect every slot that wants the wallet to the
// walletOpened signal - since we disconnect all the slots immediately // walletOpened signal - since we disconnect all the slots immediately
@ -77,8 +77,8 @@ void Kopete::WalletManager::openWallet( TQObject *object, const char *slot )
if ( !d->signal ) if ( !d->signal )
d->signal = new KopeteWalletSignal; d->signal = new KopeteWalletSignal;
// allow connecting to protected slots by calling object->connect // allow connecting to protected slots by calling object->connect
connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); connect( d->signal, TQT_SIGNAL( walletOpened( TDEWallet::Wallet* ) ), object, slot );
//object->connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); //object->connect( d->signal, TQT_SIGNAL( walletOpened( TDEWallet::Wallet* ) ), slot );
openWalletInner(); openWalletInner();
} }
@ -104,8 +104,8 @@ void Kopete::WalletManager::openWalletInner()
kdDebug(14010) << k_funcinfo << " about to open wallet async" << endl; kdDebug(14010) << k_funcinfo << " about to open wallet async" << endl;
// we have no wallet: ask for one. // we have no wallet: ask for one.
d->wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), d->wallet = TDEWallet::Wallet::openWallet( TDEWallet::Wallet::NetworkWallet(),
mainWindowID(), KWallet::Wallet::Asynchronous ); mainWindowID(), TDEWallet::Wallet::Asynchronous );
connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedStatus() ) ); connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedStatus() ) );
} }
@ -174,7 +174,7 @@ void Kopete::WalletManager::closeWallet()
emit walletLost(); emit walletLost();
} }
void Kopete::WalletManager::emitWalletOpened( KWallet::Wallet *wallet ) void Kopete::WalletManager::emitWalletOpened( TDEWallet::Wallet *wallet )
{ {
KopeteWalletSignal *signal = d->signal; KopeteWalletSignal *signal = d->signal;
d->signal = 0; d->signal = 0;

@ -23,7 +23,7 @@
#include "kopete_export.h" #include "kopete_export.h"
namespace KWallet { class Wallet; } namespace TDEWallet { class Wallet; }
namespace Kopete namespace Kopete
{ {
@ -32,7 +32,7 @@ namespace Kopete
* @author Richard Smith <kde@metafoo.co.uk> * @author Richard Smith <kde@metafoo.co.uk>
* *
* The Kopete::WalletManager class is a singleton, which looks after Kopete's * The Kopete::WalletManager class is a singleton, which looks after Kopete's
* KWallet connection. * TDEWallet connection.
*/ */
class KOPETE_EXPORT WalletManager : public TQObject class KOPETE_EXPORT WalletManager : public TQObject
{ {
@ -47,11 +47,11 @@ public:
~WalletManager(); ~WalletManager();
/** /**
* @brief Attempt to open the KWallet asyncronously, then signal an * @brief Attempt to open the TDEWallet asyncronously, then signal an
* object to indicate the task is complete. * object to indicate the task is complete.
* *
* @param object The object to call back to * @param object The object to call back to
* @param slot The slot on object to call; must have signature slot( KWallet::Wallet* ) * @param slot The slot on object to call; must have signature slot( TDEWallet::Wallet* )
* The parameter to the slot will be the wallet that was opened if the call * The parameter to the slot will be the wallet that was opened if the call
* succeeded, or NULL if the wallet failed to open or the Kopete folder was * succeeded, or NULL if the wallet failed to open or the Kopete folder was
* inaccessible. * inaccessible.
@ -90,7 +90,7 @@ private slots:
private: private:
void openWalletInner(); void openWalletInner();
void emitWalletOpened( KWallet::Wallet *wallet ); void emitWalletOpened( TDEWallet::Wallet *wallet );
class Private; class Private;
Private *d; Private *d;
@ -109,7 +109,7 @@ class KopeteWalletSignal : public TQObject
friend class Kopete::WalletManager; friend class Kopete::WalletManager;
signals: signals:
void walletOpened( KWallet::Wallet *wallet ); void walletOpened( TDEWallet::Wallet *wallet );
}; };
#endif #endif

@ -46,10 +46,10 @@ void openWalletAsync()
{ {
WalletReciever *r = new WalletReciever; WalletReciever *r = new WalletReciever;
_out << "[ASYNC] About to open wallet, receiver: " << r << endl; _out << "[ASYNC] About to open wallet, receiver: " << r << endl;
Kopete::WalletManager::self()->openWallet( r, TQT_SLOT( gotWallet( KWallet::Wallet* ) ) ); Kopete::WalletManager::self()->openWallet( r, TQT_SLOT( gotWallet( TDEWallet::Wallet* ) ) );
} }
void WalletReciever::gotWallet( KWallet::Wallet *w ) void WalletReciever::gotWallet( TDEWallet::Wallet *w )
{ {
_out << "[ASYNC] Received wallet pointer: " << w << " for receiver: " << this << endl; _out << "[ASYNC] Received wallet pointer: " << w << " for receiver: " << this << endl;
} }

@ -3,7 +3,7 @@
#include <tqobject.h> #include <tqobject.h>
namespace KWallet { class Wallet; } namespace TDEWallet { class Wallet; }
class WalletReciever : public TQObject class WalletReciever : public TQObject
{ {
@ -12,7 +12,7 @@ class WalletReciever : public TQObject
public slots: public slots:
void timer(); void timer();
private slots: private slots:
void gotWallet( KWallet::Wallet *w ); void gotWallet( TDEWallet::Wallet *w );
}; };
#endif #endif

@ -41,7 +41,7 @@
// opened multiple times. // opened multiple times.
// 3) MainController is about the only thing that isn't deleted in between connection // 3) MainController is about the only thing that isn't deleted in between connection
// attempts. // attempts.
KWallet::Wallet *wallet = 0; TDEWallet::Wallet *wallet = 0;
static const char description[] = I18N_NOOP("Remote desktop connection"); static const char description[] = I18N_NOOP("Remote desktop connection");

@ -73,12 +73,12 @@ void PreferencesDialog::load()
m_vncPrefs->setQuality( m_vncDefaults->quality() ); m_vncPrefs->setQuality( m_vncDefaults->quality() );
m_vncPrefs->setShowPrefs( m_vncDefaults->askOnConnect() ); m_vncPrefs->setShowPrefs( m_vncDefaults->askOnConnect() );
m_vncPrefs->setUseKWallet( m_vncDefaults->useKWallet() ); m_vncPrefs->setUseTDEWallet( m_vncDefaults->useTDEWallet() );
m_rdpPrefs->setRdpWidth( m_rdpDefaults->width() ); m_rdpPrefs->setRdpWidth( m_rdpDefaults->width() );
m_rdpPrefs->setRdpHeight( m_rdpDefaults->height() ); m_rdpPrefs->setRdpHeight( m_rdpDefaults->height() );
m_rdpPrefs->setShowPrefs( m_rdpDefaults->askOnConnect() ); m_rdpPrefs->setShowPrefs( m_rdpDefaults->askOnConnect() );
m_rdpPrefs->setUseKWallet( m_rdpDefaults->useKWallet() ); m_rdpPrefs->setUseTDEWallet( m_rdpDefaults->useTDEWallet() );
m_rdpPrefs->setColorDepth( m_rdpDefaults->colorDepth() ); m_rdpPrefs->setColorDepth( m_rdpDefaults->colorDepth() );
m_rdpPrefs->setKbLayout( keymap2int( m_rdpDefaults->layout() )); m_rdpPrefs->setKbLayout( keymap2int( m_rdpDefaults->layout() ));
m_rdpPrefs->setResolution(); m_rdpPrefs->setResolution();
@ -90,13 +90,13 @@ void PreferencesDialog::save()
m_vncDefaults->setQuality( m_vncPrefs->quality() ); m_vncDefaults->setQuality( m_vncPrefs->quality() );
m_vncDefaults->setAskOnConnect( m_vncPrefs->showPrefs() ); m_vncDefaults->setAskOnConnect( m_vncPrefs->showPrefs() );
m_vncDefaults->setUseKWallet( m_vncPrefs->useKWallet() ); m_vncDefaults->setUseTDEWallet( m_vncPrefs->useTDEWallet() );
m_rdpDefaults->setWidth( m_rdpPrefs->rdpWidth() ); m_rdpDefaults->setWidth( m_rdpPrefs->rdpWidth() );
m_rdpDefaults->setHeight( m_rdpPrefs->rdpHeight() ); m_rdpDefaults->setHeight( m_rdpPrefs->rdpHeight() );
m_rdpDefaults->setLayout( int2keymap( m_rdpPrefs->kbLayout() )); m_rdpDefaults->setLayout( int2keymap( m_rdpPrefs->kbLayout() ));
m_rdpDefaults->setAskOnConnect( m_rdpPrefs->showPrefs() ); m_rdpDefaults->setAskOnConnect( m_rdpPrefs->showPrefs() );
m_rdpDefaults->setUseKWallet( m_rdpPrefs->useKWallet() ); m_rdpDefaults->setUseTDEWallet( m_rdpPrefs->useTDEWallet() );
m_rdpDefaults->setColorDepth( m_rdpPrefs->colorDepth() ); m_rdpDefaults->setColorDepth( m_rdpPrefs->colorDepth() );
HostPreferences *hp = HostPreferences::instance(); HostPreferences *hp = HostPreferences::instance();

@ -41,7 +41,7 @@
bool launch_Fullscreen_rdp = false; bool launch_Fullscreen_rdp = false;
bool rdpAppDataConfigured = false; bool rdpAppDataConfigured = false;
extern KWallet::Wallet *wallet; extern TDEWallet::Wallet *wallet;
static KRdpView *krdpview; static KRdpView *krdpview;
@ -165,7 +165,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
int hv = hp->height(); int hv = hp->height();
int cd = hp->colorDepth(); int cd = hp->colorDepth();
TQString kl = hp->layout(); TQString kl = hp->layout();
bool tdewallet = hp->useKWallet(); bool tdewallet = hp->useTDEWallet();
// show preferences dialog // show preferences dialog
KDialogBase *dlg = new KDialogBase( 0L, "dlg", true, KDialogBase *dlg = new KDialogBase( 0L, "dlg", true,
@ -183,7 +183,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
prefs->setColorDepth(cd); prefs->setColorDepth(cd);
prefs->setKbLayout( keymap2int( kl ) ); prefs->setKbLayout( keymap2int( kl ) );
prefs->setShowPrefs( true ); prefs->setShowPrefs( true );
prefs->setUseKWallet(tdewallet); prefs->setUseTDEWallet(tdewallet);
if ( dlg->exec() == TQDialog::Rejected ) if ( dlg->exec() == TQDialog::Rejected )
return false; return false;
@ -197,7 +197,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
hp->setHeight(hv); hp->setHeight(hv);
hp->setColorDepth( prefs->colorDepth() ); hp->setColorDepth( prefs->colorDepth() );
hp->setLayout(kl); hp->setLayout(kl);
hp->setUseKWallet(prefs->useKWallet()); hp->setUseTDEWallet(prefs->useTDEWallet());
delete dlg; delete dlg;
return true; return true;
@ -207,7 +207,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
bool KRdpView::start() bool KRdpView::start()
{ {
SmartPtr<RdpHostPref> hp, rdpDefaults; SmartPtr<RdpHostPref> hp, rdpDefaults;
bool useKWallet = false; bool useTDEWallet = false;
TQWidget *desktop = TQT_TQWIDGET(TQApplication::desktop()); TQWidget *desktop = TQT_TQWIDGET(TQApplication::desktop());
@ -223,7 +223,7 @@ bool KRdpView::start()
hps->sync(); hps->sync();
} }
useKWallet = hp->useKWallet(); useTDEWallet = hp->useTDEWallet();
} }
m_container->show(); m_container->show();
@ -246,7 +246,7 @@ bool KRdpView::start()
*m_process << "-k" << hp->layout(); *m_process << "-k" << hp->layout();
if(!m_user.isEmpty()) { *m_process << "-u" << m_user; } if(!m_user.isEmpty()) { *m_process << "-u" << m_user; }
if(m_password.isEmpty() && useKWallet ) { if(m_password.isEmpty() && useTDEWallet ) {
TQString krdc_folder = "KRDC-RDP"; TQString krdc_folder = "KRDC-RDP";
// Bugfix: Check if wallet has been closed by an outside source // Bugfix: Check if wallet has been closed by an outside source
@ -256,8 +256,8 @@ bool KRdpView::start()
// Do we need to open the wallet? // Do we need to open the wallet?
if ( !wallet ) { if ( !wallet ) {
TQString walletName = KWallet::Wallet::NetworkWallet(); TQString walletName = TDEWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName); wallet = TDEWallet::Wallet::openWallet(walletName);
} }
if (wallet && wallet->isOpen()) { if (wallet && wallet->isOpen()) {

@ -30,7 +30,7 @@ RdpHostPref::RdpHostPref(TDEConfig *conf, const TQString &host, const TQString &
m_colorDepth(24), m_colorDepth(24),
m_layout("en-us"), m_layout("en-us"),
m_askOnConnect(true), m_askOnConnect(true),
m_useKWallet(true) m_useTDEWallet(true)
{ {
} }
@ -50,7 +50,7 @@ void RdpHostPref::save()
m_config->writeEntry(p+"colorDepth", m_colorDepth); m_config->writeEntry(p+"colorDepth", m_colorDepth);
m_config->writeEntry(p+"layout", m_layout); m_config->writeEntry(p+"layout", m_layout);
m_config->writeEntry(p+"askOnConnect", m_askOnConnect); m_config->writeEntry(p+"askOnConnect", m_askOnConnect);
m_config->writeEntry(p+"useKWallet", m_useKWallet); m_config->writeEntry(p+"useTDEWallet", m_useTDEWallet);
} }
else else
{ {
@ -60,7 +60,7 @@ void RdpHostPref::save()
m_config->writeEntry( "rdpColorDepth", m_colorDepth); m_config->writeEntry( "rdpColorDepth", m_colorDepth);
m_config->writeEntry( "rdpKeyboardLayout", m_layout ); m_config->writeEntry( "rdpKeyboardLayout", m_layout );
m_config->writeEntry( "rdpShowHostPreferences", m_askOnConnect ); m_config->writeEntry( "rdpShowHostPreferences", m_askOnConnect );
m_config->writeEntry( "rdpUseKWallet", m_useKWallet ); m_config->writeEntry( "rdpUseTDEWallet", m_useTDEWallet );
} }
} }
@ -75,7 +75,7 @@ void RdpHostPref::load()
m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24); m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24);
m_layout = m_config->readEntry(p+"layout", "en-us"); m_layout = m_config->readEntry(p+"layout", "en-us");
m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true); m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true);
m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true); m_useTDEWallet = m_config->readBoolEntry(p+"useTDEWallet", true);
} }
else else
{ {
@ -93,7 +93,7 @@ void RdpHostPref::remove()
m_config->deleteEntry(p+"colorDepth"); m_config->deleteEntry(p+"colorDepth");
m_config->deleteEntry(p+"layout"); m_config->deleteEntry(p+"layout");
m_config->deleteEntry(p+"askOnConnect"); m_config->deleteEntry(p+"askOnConnect");
m_config->deleteEntry(p+"useKWallet"); m_config->deleteEntry(p+"useTDEWallet");
} }
void RdpHostPref::setDefaults() void RdpHostPref::setDefaults()
@ -104,14 +104,14 @@ void RdpHostPref::setDefaults()
m_colorDepth = m_config->readNumEntry("rdpColorDepth", 24); m_colorDepth = m_config->readNumEntry("rdpColorDepth", 24);
m_layout = m_config->readEntry("rdpKeyboardLayout", "en-us"); m_layout = m_config->readEntry("rdpKeyboardLayout", "en-us");
m_askOnConnect = m_config->readBoolEntry("rdpShowHostPreferences", true); m_askOnConnect = m_config->readBoolEntry("rdpShowHostPreferences", true);
m_useKWallet = m_config->readBoolEntry("rdpUseKWallet", true); m_useTDEWallet = m_config->readBoolEntry("rdpUseTDEWallet", true);
} }
TQString RdpHostPref::prefDescription() const TQString RdpHostPref::prefDescription() const
{ {
return i18n("Show Preferences: %1, Resolution: %2x%3, Color Depth: %4, Keymap: %5, KWallet: %6") return i18n("Show Preferences: %1, Resolution: %2x%3, Color Depth: %4, Keymap: %5, TDEWallet: %6")
.arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(m_width).arg(m_height) .arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(m_width).arg(m_height)
.arg(m_colorDepth).arg(m_layout).arg(m_useKWallet ? i18n("yes") : i18n("no")); .arg(m_colorDepth).arg(m_layout).arg(m_useTDEWallet ? i18n("yes") : i18n("no"));
} }
void RdpHostPref::setWidth(int w) void RdpHostPref::setWidth(int w)
@ -170,11 +170,11 @@ bool RdpHostPref::askOnConnect() const
return m_askOnConnect; return m_askOnConnect;
} }
void RdpHostPref::setUseKWallet(bool use) { void RdpHostPref::setUseTDEWallet(bool use) {
m_useKWallet = use; m_useTDEWallet = use;
save(); save();
} }
bool RdpHostPref::useKWallet() const { bool RdpHostPref::useTDEWallet() const {
return m_useKWallet; return m_useTDEWallet;
} }

@ -95,7 +95,7 @@ class RdpHostPref : public HostPref
int m_colorDepth; int m_colorDepth;
TQString m_layout; TQString m_layout;
bool m_askOnConnect; bool m_askOnConnect;
bool m_useKWallet; bool m_useTDEWallet;
virtual void load(); virtual void load();
virtual void setDefaults(); virtual void setDefaults();
@ -120,8 +120,8 @@ class RdpHostPref : public HostPref
TQString layout() const; TQString layout() const;
void setAskOnConnect(bool ask); void setAskOnConnect(bool ask);
bool askOnConnect() const; bool askOnConnect() const;
bool useKWallet() const; bool useTDEWallet() const;
void setUseKWallet(bool); void setUseTDEWallet(bool);
}; };
#endif #endif

@ -362,7 +362,7 @@
</widget> </widget>
<widget class="TQCheckBox" row="4" column="0"> <widget class="TQCheckBox" row="4" column="0">
<property name="name"> <property name="name">
<cstring>cbUseKWallet</cstring> <cstring>cbUseTDEWallet</cstring>
</property> </property>
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -371,7 +371,7 @@
<string>Use K&amp;Wallet for passwords</string> <string>Use K&amp;Wallet for passwords</string>
</property> </property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">
<string>Enable this option to store your passwords with KWallet.</string> <string>Enable this option to store your passwords with TDEWallet.</string>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
@ -506,8 +506,8 @@
<function specifier="non virtual" returnType="int">kbLayout()</function> <function specifier="non virtual" returnType="int">kbLayout()</function>
<function specifier="non virtual">setShowPrefs( bool b )</function> <function specifier="non virtual">setShowPrefs( bool b )</function>
<function specifier="non virtual" returnType="bool">showPrefs()</function> <function specifier="non virtual" returnType="bool">showPrefs()</function>
<function specifier="non virtual">setUseKWallet( bool b )</function> <function specifier="non virtual">setUseTDEWallet( bool b )</function>
<function specifier="non virtual" returnType="bool">useKWallet()</function> <function specifier="non virtual" returnType="bool">useTDEWallet()</function>
</functions> </functions>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>

@ -168,12 +168,12 @@ bool RdpPrefs::showPrefs()
return cbShowPrefs->isChecked(); return cbShowPrefs->isChecked();
} }
void RdpPrefs::setUseKWallet( bool b ) void RdpPrefs::setUseTDEWallet( bool b )
{ {
cbUseKWallet->setChecked(b); cbUseTDEWallet->setChecked(b);
} }
bool RdpPrefs::useKWallet() bool RdpPrefs::useTDEWallet()
{ {
return cbUseKWallet->isChecked(); return cbUseTDEWallet->isChecked();
} }

@ -54,9 +54,9 @@ Display* dpy;
static KVncView *kvncview; static KVncView *kvncview;
//Passwords and KWallet data //Passwords and TDEWallet data
extern KWallet::Wallet *wallet; extern TDEWallet::Wallet *wallet;
bool useKWallet = false; bool useTDEWallet = false;
static TQCString password; static TQCString password;
static TQMutex passwordLock; static TQMutex passwordLock;
static TQWaitCondition passwordWaiter; static TQWaitCondition passwordWaiter;
@ -232,7 +232,7 @@ bool KVncView::editPreferences( HostPrefPtr host )
SmartPtr<VncHostPref> hp( host ); SmartPtr<VncHostPref> hp( host );
int ci = hp->quality(); int ci = hp->quality();
bool tdewallet = hp->useKWallet(); bool tdewallet = hp->useTDEWallet();
// show preferences dialog // show preferences dialog
KDialogBase *dlg = new KDialogBase( 0L, "dlg", true, KDialogBase *dlg = new KDialogBase( 0L, "dlg", true,
@ -246,7 +246,7 @@ bool KVncView::editPreferences( HostPrefPtr host )
prefs->setQuality( ci ); prefs->setQuality( ci );
prefs->setShowPrefs(true); prefs->setShowPrefs(true);
prefs->setUseKWallet(tdewallet); prefs->setUseTDEWallet(tdewallet);
if ( dlg->exec() == TQDialog::Rejected ) if ( dlg->exec() == TQDialog::Rejected )
return false; return false;
@ -254,7 +254,7 @@ bool KVncView::editPreferences( HostPrefPtr host )
ci = prefs->quality(); ci = prefs->quality();
hp->setAskOnConnect(prefs->showPrefs()); hp->setAskOnConnect(prefs->showPrefs());
hp->setQuality(ci); hp->setQuality(ci);
hp->setUseKWallet(prefs->useKWallet()); hp->setUseTDEWallet(prefs->useTDEWallet());
delete dlg; delete dlg;
return true; return true;
@ -292,7 +292,7 @@ bool KVncView::start() {
} }
configureApp(quality); configureApp(quality);
useKWallet = hp->useKWallet(); useTDEWallet = hp->useTDEWallet();
} }
setStatus(REMOTE_VIEW_CONNECTING); setStatus(REMOTE_VIEW_CONNECTING);
@ -403,8 +403,8 @@ void KVncView::customEvent(TQCustomEvent *e)
emit disconnected(); emit disconnected();
} }
else if (m_status == REMOTE_VIEW_PREPARING) { else if (m_status == REMOTE_VIEW_PREPARING) {
//Login was successfull: Write KWallet password if necessary. //Login was successfull: Write TDEWallet password if necessary.
if ( useKWallet && !password.isNull() && wallet && wallet->isOpen() && !wallet->hasEntry(host())) { if ( useTDEWallet && !password.isNull() && wallet && wallet->isOpen() && !wallet->hasEntry(host())) {
wallet->writePassword(host(), password); wallet->writePassword(host(), password);
} }
delete wallet; wallet=0; delete wallet; wallet=0;
@ -433,8 +433,8 @@ void KVncView::customEvent(TQCustomEvent *e)
// Do we need to open the wallet? // Do we need to open the wallet?
if ( !wallet ) { if ( !wallet ) {
TQString walletName = KWallet::Wallet::NetworkWallet(); TQString walletName = TDEWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet(walletName); wallet = TDEWallet::Wallet::openWallet(walletName);
} }
if (wallet && wallet->isOpen()) { if (wallet && wallet->isOpen()) {
@ -494,7 +494,7 @@ void KVncView::customEvent(TQCustomEvent *e)
break; break;
case ERROR_AUTHENTICATION: case ERROR_AUTHENTICATION:
//Login failed: Remove wallet entry if there is one. //Login failed: Remove wallet entry if there is one.
if ( useKWallet && wallet && wallet->isOpen() && wallet->hasEntry(host()) ) { if ( useTDEWallet && wallet && wallet->isOpen() && wallet->hasEntry(host()) ) {
wallet->removeEntry(host()); wallet->removeEntry(host());
} }
KMessageBox::error(0, KMessageBox::error(0,
@ -771,7 +771,7 @@ int getPassword(char *passwd, int pwlen) {
} }
//Try #2: Is there something in the wallet? //Try #2: Is there something in the wallet?
if ( !retV && useKWallet ) { if ( !retV && useTDEWallet ) {
TQApplication::postEvent(kvncview, new WalletOpenEvent()); TQApplication::postEvent(kvncview, new WalletOpenEvent());
passwordWaiter.wait(&passwordLock); //block passwordWaiter.wait(&passwordLock); //block
if (!password.isNull()) retV = 1; //got it! if (!password.isNull()) retV = 1; //got it!

@ -24,7 +24,7 @@ const TQString VncHostPref::VncType = "VNC";
VncHostPref::VncHostPref(TDEConfig *conf, const TQString &host, const TQString &type) : VncHostPref::VncHostPref(TDEConfig *conf, const TQString &host, const TQString &type) :
HostPref(conf, host, type), HostPref(conf, host, type),
m_quality(0), m_quality(0),
m_useKWallet(true), m_useTDEWallet(true),
m_askOnConnect(true) { m_askOnConnect(true) {
} }
@ -39,14 +39,14 @@ void VncHostPref::save() {
m_config->writeEntry(p+"exists", true); m_config->writeEntry(p+"exists", true);
m_config->writeEntry(p+"quality", m_quality); m_config->writeEntry(p+"quality", m_quality);
m_config->writeEntry(p+"askOnConnect", m_askOnConnect); m_config->writeEntry(p+"askOnConnect", m_askOnConnect);
m_config->writeEntry(p+"useKWallet", m_useKWallet); m_config->writeEntry(p+"useTDEWallet", m_useTDEWallet);
} }
else else
{ {
m_config->setGroup( "VncDefaultSettings" ); m_config->setGroup( "VncDefaultSettings" );
m_config->writeEntry( "vncQuality", m_quality ); m_config->writeEntry( "vncQuality", m_quality );
m_config->writeEntry( "vncShowHostPreferences", m_askOnConnect ); m_config->writeEntry( "vncShowHostPreferences", m_askOnConnect );
m_config->writeEntry( "vncUseKWallet", m_useKWallet ); m_config->writeEntry( "vncUseTDEWallet", m_useTDEWallet );
} }
} }
@ -57,7 +57,7 @@ void VncHostPref::load() {
TQString p = prefix(); TQString p = prefix();
m_quality = m_config->readNumEntry(p+"quality", 0); m_quality = m_config->readNumEntry(p+"quality", 0);
m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true); m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true);
m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true); m_useTDEWallet = m_config->readBoolEntry(p+"useTDEWallet", true);
} }
else else
{ {
@ -77,7 +77,7 @@ void VncHostPref::setDefaults() {
m_config->setGroup("VncDefaultSettings"); m_config->setGroup("VncDefaultSettings");
m_quality = m_config->readNumEntry("vncQuality", 0); m_quality = m_config->readNumEntry("vncQuality", 0);
m_askOnConnect = m_config->readBoolEntry("vncShowHostPreferences", true); m_askOnConnect = m_config->readBoolEntry("vncShowHostPreferences", true);
m_useKWallet = m_config->readBoolEntry("vncUseKWallet", true); m_useTDEWallet = m_config->readBoolEntry("vncUseTDEWallet", true);
} }
TQString VncHostPref::prefDescription() const { TQString VncHostPref::prefDescription() const {
@ -95,8 +95,8 @@ TQString VncHostPref::prefDescription() const {
default: default:
Q_ASSERT(true); Q_ASSERT(true);
} }
return i18n("Show Preferences: %1, Quality: %2, KWallet: %3") return i18n("Show Preferences: %1, Quality: %2, TDEWallet: %3")
.arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(q).arg(m_useKWallet ? i18n("yes") : i18n("no")); .arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(q).arg(m_useTDEWallet ? i18n("yes") : i18n("no"));
} }
void VncHostPref::setQuality(int q) { void VncHostPref::setQuality(int q) {
@ -117,11 +117,11 @@ bool VncHostPref::askOnConnect() const {
return m_askOnConnect; return m_askOnConnect;
} }
void VncHostPref::setUseKWallet(bool use) { void VncHostPref::setUseTDEWallet(bool use) {
m_useKWallet = use; m_useTDEWallet = use;
save(); save();
} }
bool VncHostPref::useKWallet() const { bool VncHostPref::useTDEWallet() const {
return m_useKWallet; return m_useTDEWallet;
} }

@ -26,7 +26,7 @@ protected:
int m_quality; int m_quality;
bool m_askOnConnect; bool m_askOnConnect;
bool m_useKWallet; bool m_useTDEWallet;
virtual void load(); virtual void load();
virtual void setDefaults(); virtual void setDefaults();
@ -45,8 +45,8 @@ public:
int quality() const; int quality() const;
void setAskOnConnect(bool ask); void setAskOnConnect(bool ask);
bool askOnConnect() const; bool askOnConnect() const;
void setUseKWallet(bool); void setUseTDEWallet(bool);
bool useKWallet() const; bool useTDEWallet() const;
}; };
#endif #endif

@ -46,7 +46,7 @@
</widget> </widget>
<widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>cbUseKWallet</cstring> <cstring>cbUseTDEWallet</cstring>
</property> </property>
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
@ -55,7 +55,7 @@
<string>Use K&amp;Wallet for passwords</string> <string>Use K&amp;Wallet for passwords</string>
</property> </property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">
<string>Enable this option to store your passwords with KWallet.</string> <string>Enable this option to store your passwords with TDEWallet.</string>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
@ -157,8 +157,8 @@
<function specifier="non virtual" returnType="int">showPrefs()</function> <function specifier="non virtual" returnType="int">showPrefs()</function>
<function specifier="non virtual">setUseEncryption( bool b )</function> <function specifier="non virtual">setUseEncryption( bool b )</function>
<function specifier="non virtual" returnType="bool">useEncryption()</function> <function specifier="non virtual" returnType="bool">useEncryption()</function>
<function specifier="non virtual">setUseKWallet( bool b )</function> <function specifier="non virtual">setUseTDEWallet( bool b )</function>
<function specifier="non virtual" returnType="bool">useKWallet()</function> <function specifier="non virtual" returnType="bool">useTDEWallet()</function>
</functions> </functions>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>

@ -42,12 +42,12 @@ bool VncPrefs::useEncryption()
return cbUseEncryption->isChecked(); return cbUseEncryption->isChecked();
} }
void VncPrefs::setUseKWallet( bool b ) void VncPrefs::setUseTDEWallet( bool b )
{ {
cbUseKWallet->setChecked(b); cbUseTDEWallet->setChecked(b);
} }
bool VncPrefs::useKWallet() bool VncPrefs::useTDEWallet()
{ {
return cbUseKWallet->isChecked(); return cbUseTDEWallet->isChecked();
} }

Loading…
Cancel
Save