[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kopete/dev-0.12/kopete/protocols/winpopup
From:       Gerd Fleischer <gerdfleischer () web ! de>
Date:       2006-02-02 16:02:37
Message-ID: 1138896157.648509.2469.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 504935 by geflei:

simplify apply settings

 M  +2 -12     wpaccount.cpp  
 M  +0 -5      wpaccount.h  
 M  +1 -7      wpeditaccount.cpp  
 M  +1 -1      wpprotocol.cpp  
 M  +1 -1      wpprotocol.h  


--- branches/work/kopete/dev-0.12/kopete/protocols/winpopup/wpaccount.cpp \
#504934:504935 @@ -38,15 +38,11 @@
 {
 //	kdDebug(14170) <<  "WPAccount::WPAccount()" << endl;
 
-	// setup internals
-	QString theHostName = accountID;
-
 	// we need this before initActions
-	setMyself( new WPContact(this, theHostName, theHostName, \
Kopete::ContactList::self()->myself()) ); +	Kopete::MetaContact *myself = \
Kopete::ContactList::self()->myself(); +	setMyself( new WPContact(this, accountID, \
myself->displayName(), myself) );  
 //	if (excludeConnect()) connect(Kopete::OnlineStatus::Online); // ??
-
-	QObject::connect(this, SIGNAL(settingsChanged()), parent, \
SLOT(slotSettingsChanged()));  }
 
 // Destructor
@@ -64,12 +60,6 @@
 	return static_cast<WPProtocol *>(protocol())->getHosts(Group);
 }
 
-void WPAccount::slotSettingsChanged()
-{
-//	kdDebug(14170) <<  "WPAccount::slotSettingsChanged()" << endl;
-	emit(settingsChanged());
-}
-
 bool WPAccount::checkHost(const QString &Name)
 {
 //	kdDebug() << "WPAccount::checkHost: " << Name << endl;
--- branches/work/kopete/dev-0.12/kopete/protocols/winpopup/wpaccount.h \
#504934:504935 @@ -90,8 +90,6 @@
 	/* Reimplemented from Kopete::Account */
 	void setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason = \
QString::null);  
-	void slotSettingsChanged();
-
 protected:
 	virtual bool createContact(const QString &contactId, Kopete::MetaContact \
*parentContact);  
@@ -100,9 +98,6 @@
 
 private:
 	QString theAwayMessage;			// The message to give when the user is away
-
-signals:
-	void settingsChanged();
 };
 
 #endif
--- branches/work/kopete/dev-0.12/kopete/protocols/winpopup/wpeditaccount.cpp \
#504934:504935 @@ -102,11 +102,6 @@
 		return false;
 	}
 
-	if (!mProtocol->checkMessageDir()) {
-		KMessageBox::sorry(this, i18n("<qt>There is a serious problem with your working \
                directory.</qt>"), i18n("WinPopup"));
-		return false;
-	}
-
 	return true;
 }
 
@@ -128,8 +123,7 @@
 	account()->setExcludeConnect(mAutoConnect->isChecked());
 	writeConfig();
 
-	//is there already an API function or signal? GF
-	dynamic_cast<WPAccount *>(account())->slotSettingsChanged();
+	mProtocol->settingsChanged();
 
 	return account();
 }
--- branches/work/kopete/dev-0.12/kopete/protocols/winpopup/wpprotocol.cpp \
#504934:504935 @@ -121,7 +121,7 @@
 	return new WPAccount(this, accountId);
 }
 
-void WPProtocol::slotSettingsChanged()
+void WPProtocol::settingsChanged()
 {
 	kdDebug(14170) <<  "WPProtocol::slotSettingsChanged()" << endl;
 
--- branches/work/kopete/dev-0.12/kopete/protocols/winpopup/wpprotocol.h \
#504934:504935 @@ -75,9 +75,9 @@
 	const Kopete::OnlineStatus WPAway;
 	const Kopete::OnlineStatus WPOffline;
 	void sendMessage(const QString &Body, const QString &Destination);
+	void settingsChanged(void);			// Callback when settings changed
 
 public slots:
-	void slotSettingsChanged(void);			// Callback when settings changed
 	void installSamba();				// Modify smb.conf to use winpopup-send.sh script
 	void slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString \
&From);  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic