rev 3067 - trunk/packages/kdenetwork/debian/patches

Christopher Martin chrsmrtn at costa.debian.org
Wed Feb 1 21:38:41 UTC 2006


Author: chrsmrtn
Date: 2006-02-01 21:38:40 +0000 (Wed, 01 Feb 2006)
New Revision: 3067

Added:
   trunk/packages/kdenetwork/debian/patches/01_kdenetwork_branch_r504660.diff
Log:
New kdenetwork branch pull.


Added: trunk/packages/kdenetwork/debian/patches/01_kdenetwork_branch_r504660.diff
===================================================================
--- trunk/packages/kdenetwork/debian/patches/01_kdenetwork_branch_r504660.diff	2006-02-01 21:22:42 UTC (rev 3066)
+++ trunk/packages/kdenetwork/debian/patches/01_kdenetwork_branch_r504660.diff	2006-02-01 21:38:40 UTC (rev 3067)
@@ -0,0 +1,4018 @@
+#DPATCHLEVEL=0
+--- kopete/plugins/smpppdcs/smpppdlocationwidget.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdlocationwidget.cpp	(revision 504660)
+@@ -1,30 +0,0 @@
+-/*
+-    smpppdlocationwidget.cpp
+-
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+-
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#include <klineedit.h>
+-
+-#include "smpppdlocationwidget.h"
+-
+-SMPPPDLocationWidget::SMPPPDLocationWidget(QWidget* parent, const char* name, WFlags fl)
+- : SMPPPDLocationWidgetBase(parent, name, fl) {}
+-
+-SMPPPDLocationWidget::~SMPPPDLocationWidget() {}
+-
+-void SMPPPDLocationWidget::setServer(const QString& serv) {
+-    server->setText(serv);
+-}
+-
+-#include "smpppdlocationwidget.moc"
+--- kopete/plugins/smpppdcs/kinternetiface.h	(revision 502708)
++++ kopete/plugins/smpppdcs/kinternetiface.h	(revision 504660)
+@@ -1,47 +0,0 @@
+-// -*- c++ -*-
+-/***************************************************************************
+- *									   *
+- *   Copyright: SuSE Linux AG, Nuernberg				   *
+- *									   *
+- *   Author: Arvin Schnell <arvin at suse.de>				   *
+- *									   *
+- ***************************************************************************/
+-
+-/***************************************************************************
+- *									   *
+- *   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.				   *
+- *									   *
+- ***************************************************************************/
+-
+-
+-#ifndef KINTERNETIFACE_H
+-#define KINTERNETIFACE_H
+-
+-
+-#include <dcopobject.h>
+-
+-class KInternetIface : public DCOPObject
+-{
+-    K_DCOP
+-
+-public:
+-
+-    KInternetIface (const QCString& name) : DCOPObject (name) { }
+-
+-k_dcop:
+-
+-    // query function for susewatcher
+-    bool isOnline () {
+-#ifndef NDEBUG
+-	fprintf (stderr, "%s\n", __PRETTY_FUNCTION__);
+-#endif
+-	return kinternet && kinternet->get_status () == KInternet::CONNECTED;
+-    }
+-
+-};
+-
+-
+-#endif
+--- kopete/plugins/smpppdcs/smpppdcsconfig.kcfgc	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsconfig.kcfgc	(revision 504660)
+@@ -1,6 +0,0 @@
+-File=smpppdcs.kcfg
+-ClassName=SMPPPDCSConfig
+-Singleton=true
+-Mutators=true
+-MemberVariables=private
+-GlobalEnums=true
+\ No newline at end of file
+--- kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp	(revision 504660)
+@@ -1,165 +0,0 @@
+-/*
+-    smpppdcsprefsimpl.cpp
+- 
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+- 
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#include <arpa/inet.h>
+-#include <netdb.h>
+-
+-#include <qradiobutton.h>
+-
+-#include <kstandarddirs.h>
+-#include <kapplication.h>
+-#include <kpushbutton.h>
+-#include <kresolver.h>
+-#include <knuminput.h>
+-#include <klocale.h>
+-#include <kdebug.h>
+-
+-#include "kopetepluginmanager.h"
+-
+-#include "../smpppdcsplugin.h"
+-
+-#include "smpppdlocationwidget.h"
+-#include "smpppdcsprefsimpl.h"
+-#include "smpppdsearcher.h"
+-
+-SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl)
+-	: SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) {
+-
+-	// search for our main-plugin instance
+-	Kopete::Plugin * p = Kopete::PluginManager::self()->plugin("kopete_smpppdcs");
+-	if(p) {
+-		m_plugin = static_cast<SMPPPDCSPlugin *>(p);
+-	}
+-
+-    // signals and slots connections
+-    connect(useNetstat, SIGNAL(toggled(bool)), this, SLOT(disableSMPPPDSettings()));
+-    connect(useSmpppd,  SIGNAL(toggled(bool)), this, SLOT(enableSMPPPDSettings()));
+-    connect(autoCSTest, SIGNAL(clicked()),     this, SLOT(determineCSType()));
+-	
+-	if(m_plugin) {
+-		connect((QObject *)SMPPPDLocation->server, SIGNAL(textChanged(const QString&)),
+-				m_plugin, SLOT(smpppdServerChanged(const QString&)));
+-	}
+-
+-    // if netstat is NOT available, disable the option and set to SMPPPD
+-    if(KStandardDirs::findExe("netstat") == QString::null) {
+-        autoCSTest->setEnabled(FALSE);
+-        useNetstat->setEnabled(FALSE);
+-        useNetstat->setChecked(FALSE);
+-        useSmpppd->setChecked(TRUE);
+-    }
+-}
+-
+-SMPPPDCSPrefs::~SMPPPDCSPrefs() {
+-    delete m_scanProgressDlg;
+-}
+-
+-void SMPPPDCSPrefs::determineCSType() {
+-
+-    // while we search, we'll disable the button
+-    autoCSTest->setEnabled(false);
+-    //kapp->processEvents();
+-
+-    /* broadcast network for a smpppd.
+-       If one is available set to smpppd method */
+-
+-    SMPPPDSearcher searcher;
+-    m_curSearcher = &searcher;
+-
+-    connect(&searcher, SIGNAL(smpppdFound(const QString&)), this, SLOT(smpppdFound(const QString&)));
+-    connect(&searcher, SIGNAL(smpppdNotFound()), this, SLOT(smpppdNotFound()));
+-    connect(&searcher, SIGNAL(scanStarted(uint)), this, SLOT(scanStarted(uint)));
+-    connect(&searcher, SIGNAL(scanProgress(uint)), this, SLOT(scanProgress(uint)));
+-    connect(&searcher, SIGNAL(scanFinished()), this, SLOT(scanFinished()));
+-
+-    searcher.searchNetwork();
+-    m_curSearcher = NULL;
+-}
+-
+-void SMPPPDCSPrefs::scanStarted(uint total) {
+-    kdDebug(14312) << k_funcinfo << "Scanning for a SMPPPD started. Will scan " << total << " IPs" << endl;
+-
+-    // setup the scanProgress Dialog
+-    if(!m_scanProgressDlg) {
+-        m_scanProgressDlg = new KProgressDialog(this, 0, i18n("Searching"), i18n("Searching for a SMPPPD on the local network..."), TRUE);
+-        m_scanProgressDlg->setAutoClose(TRUE);
+-        m_scanProgressDlg->setAllowCancel(TRUE);
+-        m_scanProgressDlg->setMinimumDuration(2000);
+-
+-        connect(m_scanProgressDlg, SIGNAL(cancelClicked()), this, SLOT(cancelScanning()));
+-    }
+-    m_scanProgressDlg->progressBar()->setTotalSteps(total);
+-    m_scanProgressDlg->progressBar()->setProgress(0);
+-    m_scanProgressDlg->show();
+-}
+-
+-void SMPPPDCSPrefs::scanProgress(uint cur) {
+-    m_scanProgressDlg->progressBar()->setProgress(cur);
+-    kapp->processEvents();
+-}
+-
+-void SMPPPDCSPrefs::cancelScanning() {
+-    kdDebug(14312) << k_funcinfo << endl;
+-    Q_ASSERT(m_curSearcher);
+-    m_curSearcher->cancelSearch();
+-}
+-
+-void SMPPPDCSPrefs::smpppdFound(const QString& host) {
+-    kdDebug(14312) << k_funcinfo << endl;
+-
+-    QString myHost = host;
+-
+-    // try to get the domain name
+-    struct in_addr addr;
+-    if(inet_aton(host.ascii(), &addr)) {
+-        struct hostent * hostEnt = gethostbyaddr(&addr.s_addr, sizeof(addr.s_addr), AF_INET);
+-        if(hostEnt) {
+-            myHost = hostEnt->h_name;
+-        } else {
+-#ifndef NDEBUG
+-            switch(h_errno) {
+-            case HOST_NOT_FOUND:
+-                kdDebug(14312) << k_funcinfo << "No such host is known in the database." << endl;
+-                break;
+-            case TRY_AGAIN:
+-                kdDebug(14312) << k_funcinfo << "Couldn't contact DNS server." << endl;
+-                break;
+-            case NO_RECOVERY:
+-                kdDebug(14312) << k_funcinfo << "A non-recoverable error occurred." << endl;
+-                break;
+-            case NO_ADDRESS:
+-                kdDebug(14312) << k_funcinfo << "The host database contains an entry for the name, but it doesn't have an associated Internet address." << endl;
+-                break;
+-            }
+-#endif
+-
+-        }
+-    }
+-
+-    SMPPPDLocation->setServer(myHost);
+-    useNetstat->setChecked(false);
+-    useSmpppd->setChecked(true);
+-    autoCSTest->setEnabled(true);
+-}
+-
+-void SMPPPDCSPrefs::smpppdNotFound() {
+-    kdDebug(14312) << k_funcinfo << endl;
+-    useNetstat->setChecked(true);
+-    useSmpppd->setChecked(false);
+-    autoCSTest->setEnabled(true);
+-}
+-
+-#include "smpppdcsprefsimpl.moc"
+--- kopete/plugins/smpppdcs/smpppdcspreferences.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcspreferences.cpp	(revision 504660)
+@@ -1,187 +0,0 @@
+-/*
+-    smpppdcspreferences.cpp
+-
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+-
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#include <qlayout.h>
+-#include <qregexp.h>
+-#include <qradiobutton.h>
+-
+-#include <klistview.h>
+-#include <klineedit.h>
+-#include <knuminput.h>
+-#include <kgenericfactory.h>
+-
+-#include "kopeteaccount.h"
+-#include "kopeteprotocol.h"
+-#include "kopeteaccountmanager.h"
+-
+-#include "smpppdlocationwidget.h"
+-#include "smpppdcspreferences.h"
+-#include "smpppdcsprefsimpl.h"
+-#include "smpppdcsconfig.h"
+-
+-typedef KGenericFactory<SMPPPDCSPreferences> SMPPPDCSPreferencesFactory;
+-K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs"))
+-
+-SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name */, const QStringList& args)
+- : KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) {
+-
+- 	Kopete::AccountManager * manager = Kopete::AccountManager::self(); 
+-	(new QVBoxLayout(this))->setAutoAdd(true);
+-	m_ui = new SMPPPDCSPrefs(this);
+-
+-	for(QPtrListIterator<Kopete::Account> it(manager->accounts()); it.current(); ++it)
+-	{
+-		QString protoName;
+-		QRegExp rex("(.*)Protocol");
+-		
+-		if(rex.search((*it)->protocol()->pluginId()) > -1) {
+-			protoName = rex.cap(1);
+-		} else {
+-			protoName = (*it)->protocol()->pluginId();
+-		}
+-		
+-		if(it.current()->inherits("Kopete::ManagedConnectionAccount")) {
+-			protoName += QString(", %1").arg(i18n("connection status is managed by Kopete"));
+-		}
+-		
+-		QCheckListItem * cli = new QCheckListItem(m_ui->accountList, 
+-				(*it)->accountId() + " (" + protoName + ")", QCheckListItem::CheckBox);
+-		cli->setPixmap(0, (*it)->accountIcon());
+-		
+-		m_accountMapOld[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId());
+-		m_accountMapCur[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId());;
+-		m_ui->accountList->insertItem(cli);
+-	}
+-
+-	connect(m_ui->accountList, SIGNAL(clicked(QListViewItem *)), this, SLOT(listClicked(QListViewItem *)));
+-	
+-	// connect for modified
+-	connect(m_ui->useNetstat, SIGNAL(clicked()), this, SLOT(slotModified()));
+-	connect(m_ui->useSmpppd,  SIGNAL(clicked()), this, SLOT(slotModified()));
+-	
+-	connect(m_ui->SMPPPDLocation->server,   SIGNAL(textChanged(const QString&)), this, SLOT(slotModified()));
+-	connect(m_ui->SMPPPDLocation->port,     SIGNAL(valueChanged(int)), this, SLOT(slotModified()));
+-	connect(m_ui->SMPPPDLocation->Password, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified()));
+-	
+-	load();
+-}
+-
+-SMPPPDCSPreferences::~SMPPPDCSPreferences() {
+-	delete m_ui;
+-}
+-
+-void SMPPPDCSPreferences::listClicked(QListViewItem * item)
+-{
+-	QCheckListItem * cli = dynamic_cast<QCheckListItem *>(item);
+-	
+-	if(cli->isOn() != m_accountMapCur[cli->text(0)].m_on) {
+-		AccountMap::iterator itOld = m_accountMapOld.begin();
+-		AccountMap::iterator itCur;
+-		bool change = FALSE;
+-		
+-		for(itCur = m_accountMapCur.begin(); itCur != m_accountMapCur.end(); ++itCur, ++itOld) {
+-			if((*itCur).m_on != (*itOld).m_on){
+-				change = TRUE;
+-				break;
+-			}
+-		}
+-		emit KCModule::changed(change);
+-	}
+-	m_accountMapCur[cli->text(0)].m_on = cli->isOn();
+-}
+-
+-void SMPPPDCSPreferences::defaults()
+-{
+-	QListViewItemIterator it(m_ui->accountList);
+-	while(it.current()) {
+-		QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
+-		cli->setOn(FALSE);
+-		++it;
+-	}
+-	
+-	SMPPPDCSConfig::self()->setDefaults();
+-	
+-	m_ui->useNetstat->setChecked(SMPPPDCSConfig::self()->useNetstat());
+-	m_ui->useSmpppd->setChecked(SMPPPDCSConfig::self()->useSmpppd());
+-	
+-	m_ui->SMPPPDLocation->server->setText(SMPPPDCSConfig::self()->server());
+-	m_ui->SMPPPDLocation->port->setValue(SMPPPDCSConfig::self()->port());
+-	m_ui->SMPPPDLocation->Password->setText(SMPPPDCSConfig::self()->password());
+-}
+-
+-void SMPPPDCSPreferences::load()
+-{
+-	
+-	SMPPPDCSConfig::self()->readConfig();
+-	
+-	static QString rexStr = "^(.*) \\((.*)\\)";
+-	QRegExp rex(rexStr);
+-	QStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
+-	QListViewItemIterator it(m_ui->accountList);
+-	while(it.current()) {
+-		QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
+-		if(rex.search(cli->text(0)) > -1) {
+-			bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1));
+-			// m_accountMapOld[cli->text(0)].m_on = isOn;
+-			m_accountMapCur[cli->text(0)].m_on = isOn;
+-			cli->setOn(isOn);
+-		}
+-		++it;
+-	}
+-	
+-	m_ui->useNetstat->setChecked(SMPPPDCSConfig::self()->useNetstat());
+-	m_ui->useSmpppd->setChecked(SMPPPDCSConfig::self()->useSmpppd());
+-	
+-	m_ui->SMPPPDLocation->server->setText(SMPPPDCSConfig::self()->server());
+-	m_ui->SMPPPDLocation->port->setValue(SMPPPDCSConfig::self()->port());
+-	m_ui->SMPPPDLocation->Password->setText(SMPPPDCSConfig::self()->password());
+-	
+-	emit KCModule::changed(false);
+-}
+-
+-void SMPPPDCSPreferences::save()
+-{
+-	QStringList list;
+-	QListViewItemIterator it(m_ui->accountList);
+-	while(it.current()) {
+-	
+-		QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
+-		if(cli->isOn()) {
+-			list.append(m_accountMapCur[cli->text(0)].m_id);
+-		}
+-		
+-		++it;
+-	}
+-	
+-	SMPPPDCSConfig::self()->setIgnoredAccounts(list);
+-	
+-	SMPPPDCSConfig::self()->setUseNetstat(m_ui->useNetstat->isChecked());
+-	SMPPPDCSConfig::self()->setUseSmpppd(m_ui->useSmpppd->isChecked());
+-	
+-	SMPPPDCSConfig::self()->setServer(m_ui->SMPPPDLocation->server->text());
+-	SMPPPDCSConfig::self()->setPort(m_ui->SMPPPDLocation->port->value());
+-	SMPPPDCSConfig::self()->setPassword(m_ui->SMPPPDLocation->Password->text());
+-	
+-	SMPPPDCSConfig::self()->writeConfig();
+-	
+-	emit KCModule::changed(false);
+-}
+-
+-void SMPPPDCSPreferences::slotModified() {
+-	emit KCModule::changed(true);
+-}
+-
+-#include "smpppdcspreferences.moc"
+--- kopete/plugins/smpppdcs/smpppdcs.kcfg	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcs.kcfg	(revision 504660)
+@@ -1,29 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
+-<kcfg> 
+-  <kcfgfile name="kopeterc"/> 
+-  <group name="SMPPPDCS Plugin"> 
+-    <entry name="Password" type="String"> 
+-      <label>Password to connect to the SMPPPD.</label> 
+-    </entry> 
+-    <entry name="ignoredAccounts" type="StringList"> 
+-      <label>Accounts to ignore in the plugin.</label> 
+-    </entry> 
+-    <entry name="server" type="String"> 
+-      <label>SMPPPD-Server to connect.</label> 
+-      <default>localhost</default>
+-    </entry> 
+-    <entry name="port" type="UInt"> 
+-      <label>SMPPPD-Server port to connect.</label> 
+-      <default>3185</default>
+-    </entry> 
+-    <entry name="useNetstat" type="Bool"> 
+-      <label>Use the netstat tool to determine the connection status.</label> 
+-      <default>true</default>
+-    </entry> 
+-    <entry name="useSmpppd" type="Bool"> 
+-      <label>Use the SMPPPD to determine the connection status.</label> 
+-      <default>false</default>
+-    </entry> 
+-  </group> 
+-</kcfg>
+\ No newline at end of file
+--- kopete/plugins/smpppdcs/smpppdlocationui.ui	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdlocationui.ui	(revision 504660)
+@@ -1,149 +0,0 @@
+-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+-<class>SMPPPDLocationWidgetBase</class>
+-<widget class="QWidget">
+-    <property name="name">
+-        <cstring>SMPPPDLocationWidgetBase</cstring>
+-    </property>
+-    <property name="geometry">
+-        <rect>
+-            <x>0</x>
+-            <y>0</y>
+-            <width>365</width>
+-            <height>167</height>
+-        </rect>
+-    </property>
+-    <property name="caption">
+-        <string>SMPPPDLocation</string>
+-    </property>
+-    <vbox>
+-        <property name="name">
+-            <cstring>unnamed</cstring>
+-        </property>
+-        <widget class="QLabel">
+-            <property name="name">
+-                <cstring>textLabel1</cstring>
+-            </property>
+-            <property name="text">
+-                <string>Ser&amp;ver:</string>
+-            </property>
+-            <property name="buddy" stdset="0">
+-                <cstring>server</cstring>
+-            </property>
+-        </widget>
+-        <widget class="KLineEdit">
+-            <property name="name">
+-                <cstring>server</cstring>
+-            </property>
+-            <property name="cursor">
+-                <cursor>4</cursor>
+-            </property>
+-            <property name="text">
+-                <string>localhost</string>
+-            </property>
+-            <property name="maxLength">
+-                <number>256</number>
+-            </property>
+-            <property name="toolTip" stdset="0">
+-                <string>The server on which the SMPPPD is running</string>
+-            </property>
+-        </widget>
+-        <widget class="QLabel">
+-            <property name="name">
+-                <cstring>textLabel2</cstring>
+-            </property>
+-            <property name="text">
+-                <string>P&amp;ort:</string>
+-            </property>
+-            <property name="buddy" stdset="0">
+-                <cstring>port</cstring>
+-            </property>
+-        </widget>
+-        <widget class="QLayoutWidget">
+-            <property name="name">
+-                <cstring>layout14</cstring>
+-            </property>
+-            <hbox>
+-                <property name="name">
+-                    <cstring>unnamed</cstring>
+-                </property>
+-                <widget class="KIntNumInput">
+-                    <property name="name">
+-                        <cstring>port</cstring>
+-                    </property>
+-                    <property name="cursor">
+-                        <cursor>4</cursor>
+-                    </property>
+-                    <property name="value">
+-                        <number>3185</number>
+-                    </property>
+-                    <property name="minValue">
+-                        <number>0</number>
+-                    </property>
+-                    <property name="toolTip" stdset="0">
+-                        <string>The port on which the SMPPPD is running on</string>
+-                    </property>
+-                </widget>
+-                <widget class="QLabel">
+-                    <property name="name">
+-                        <cstring>textLabel3</cstring>
+-                    </property>
+-                    <property name="text">
+-                        <string>Default: 3185</string>
+-                    </property>
+-                </widget>
+-                <spacer>
+-                    <property name="name">
+-                        <cstring>spacer15</cstring>
+-                    </property>
+-                    <property name="orientation">
+-                        <enum>Horizontal</enum>
+-                    </property>
+-                    <property name="sizeType">
+-                        <enum>Expanding</enum>
+-                    </property>
+-                    <property name="sizeHint">
+-                        <size>
+-                            <width>130</width>
+-                            <height>20</height>
+-                        </size>
+-                    </property>
+-                </spacer>
+-            </hbox>
+-        </widget>
+-        <widget class="QLabel">
+-            <property name="name">
+-                <cstring>m_passwordLabel</cstring>
+-            </property>
+-            <property name="text">
+-                <string>Pass&amp;word:</string>
+-            </property>
+-            <property name="buddy" stdset="0">
+-                <cstring>Password</cstring>
+-            </property>
+-        </widget>
+-        <widget class="KLineEdit">
+-            <property name="name">
+-                <cstring>Password</cstring>
+-            </property>
+-            <property name="cursor">
+-                <cursor>4</cursor>
+-            </property>
+-            <property name="echoMode">
+-                <enum>Password</enum>
+-            </property>
+-            <property name="toolTip" stdset="0">
+-                <string>The password to authenticate with the smpppd</string>
+-            </property>
+-        </widget>
+-    </vbox>
+-</widget>
+-<customwidgets>
+-</customwidgets>
+-<layoutdefaults spacing="6" margin="0"/>
+-<includehints>
+-    <includehint>klineedit.h</includehint>
+-    <includehint>knuminput.h</includehint>
+-    <includehint>knuminput.h</includehint>
+-    <includehint>klineedit.h</includehint>
+-</includehints>
+-</UI>
+--- kopete/plugins/smpppdcs/smpppdsearcher.h	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdsearcher.h	(revision 504660)
+@@ -1,102 +0,0 @@
+-/*
+-    smpppdsearcher.h
+- 
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+- 
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-
+-#ifndef SMPPPDSEARCHER_H
+-#define SMPPPDSEARCHER_H
+-
+-#include <kresolver.h>
+-
+-class KProcess;
+-
+-/**
+- * @brief Searches a network for a smpppd
+- *
+- * @todo Use of the SLP to find the smpppd
+- * @author Heiko Sch&auml;fer <heiko at rangun.de>
+- */
+-class SMPPPDSearcher : public QObject {
+-    Q_OBJECT
+-
+-    SMPPPDSearcher(const SMPPPDSearcher&);
+-    SMPPPDSearcher& operator=(const SMPPPDSearcher&);
+-
+-public:
+-    /**
+-     * @brief Creates an <code>SMPPPDSearcher</code> instance
+-     */
+-    SMPPPDSearcher();
+-	
+-    /**
+-     * @brief Destroys an <code>SMPPPDSearcher</code> instance
+-     */
+-    ~SMPPPDSearcher();
+-
+-    /**
+-     * @brief Triggers a network scan to find a smpppd
+-	 * @see smpppdFound
+-	 * @see smpppdNotFound
+-     */
+-    void searchNetwork();
+-	
+-	void cancelSearch();
+-
+-protected:
+-    /**
+-     * @brief Scans a network for a smpppd
+-	 *
+-	 * Scans a network for a smpppd described by
+-	 * ip and mask.
+-	 *
+-     * @param ip   the ntwork ip
+-     * @param mask the network mask
+-     * @return <code>TRUE</code> if an smpppd was found
+-     */
+-    bool scan(const QString& ip, const QString& mask);
+-
+-signals:
+-    /**
+-     * @brief A smppd was found
+-	 * 
+-     * @param host the host there the smpppd was found
+-     */
+-    void smpppdFound(const QString& host);
+-	
+-    /**
+-     * @brief No smpppd was found 
+-     */
+-    void smpppdNotFound();
+-	
+-	void scanStarted(uint total);
+-	void scanProgress(uint cur);
+-	void scanFinished();
+-
+-protected slots:
+-    void slotStdoutReceivedIfconfig(KProcess * proc, char * buf, int len);
+-    void slotStdoutReceivedNetstat (KProcess * proc, char * buf, int len);
+-
+-private:
+-	bool m_cancelSearchNow;
+-    KProcess * m_procIfconfig;
+-    KProcess * m_procNetstat;
+-};
+-
+-inline void SMPPPDSearcher::cancelSearch() {
+-	m_cancelSearchNow = TRUE;
+-}
+-
+-#endif
+-
+--- kopete/plugins/smpppdcs/detectornetworkstatus.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/detectornetworkstatus.cpp	(revision 504660)
+@@ -1,68 +0,0 @@
+-/*
+-	detectornetworkstatus.cpp
+-
+-	Copyright (c) 2006      by Heiko Schaefer        <heiko at rangun.de>
+-
+-	Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-	*                                                                       *
+-	*************************************************************************
+-*/
+-
+-#include <kdebug.h>
+-
+-#include "kopeteuiglobal.h"
+-#include "connectionmanager.h"
+-
+-#include "iconnector.h"
+-#include "detectornetworkstatus.h"
+-
+-DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector) 
+-	: Detector(connector), m_connManager(NULL) {
+-	
+-	m_connManager = ConnectionManager::self();
+-	connect(m_connManager, SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus)),
+-			this, SLOT(statusChanged(const QString&, NetworkStatus::EnumStatus)));
+-}
+-
+-DetectorNetworkStatus::~DetectorNetworkStatus() {}
+-
+-void DetectorNetworkStatus::checkStatus() const {
+-	// needs to do nothing
+-}
+-
+-void DetectorNetworkStatus::statusChanged(const QString& host, NetworkStatus::EnumStatus status) {
+-	switch(status) {
+-		case NetworkStatus::Offline:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl;
+-			break;
+-		case NetworkStatus::OfflineFailed:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineFailed" << endl;
+-			break;
+-		case NetworkStatus::OfflineDisconnected:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineDisconnected" << endl;
+-			break;
+-		case NetworkStatus::ShuttingDown:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::ShuttingDown" << endl;
+-			break;
+-		case NetworkStatus::Establishing:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Establishing" << endl;
+-			break;
+-		case NetworkStatus::Online:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Online" << endl;
+-			break;
+-		case NetworkStatus::NoNetworks:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::NoNetworks" << endl;
+-			break;
+-		case NetworkStatus::Unreachable:
+-			kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Unreachable" << endl;
+-			break;
+-	}
+-}
+-
+-#include "detectornetworkstatus.moc"
+--- kopete/plugins/smpppdcs/smpppdlocationwidget.h	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdlocationwidget.h	(revision 504660)
+@@ -1,39 +0,0 @@
+-/*
+-    smpppdlocationwidget.h
+-
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+-
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#ifndef SMPPPDLOCATIONWIDGET_H
+-#define SMPPPDLOCATIONWIDGET_H
+-
+-#include "smpppdlocationui.h"
+-
+-/**
+-	@author Heiko Sch&auml;fer <heiko at rangun.de>
+-*/
+-class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase
+-{
+-	Q_OBJECT
+-
+-	SMPPPDLocationWidget(const SMPPPDLocationWidget&);
+-	SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&);
+-
+-public:
+-    SMPPPDLocationWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+-    ~SMPPPDLocationWidget();
+-
+-    void setServer(const QString& serv);
+-};
+-
+-#endif
+--- kopete/plugins/smpppdcs/kopete_smpppdcs_config.desktop	(revision 502708)
++++ kopete/plugins/smpppdcs/kopete_smpppdcs_config.desktop	(revision 504660)
+@@ -1,85 +0,0 @@
+-[Desktop Entry]
+-Encoding=UTF-8
+-Icon=smpppdcs
+-Type=Service
+-ServiceTypes=KCModule
+-
+-X-KDE-ModuleType=Library
+-X-KDE-Library=kopete_smpppdcs
+-X-KDE-FactoryName=SMPPPDCSConfigFactory
+-X-KDE-ParentApp=kopete_smpppdcs
+-X-KDE-ParentComponents=kopete_smpppdcs
+-
+-X-Kopete-Version=1000900
+-
+-Name=SUSE SMPPPD Connection Status
+-Name[bn]=SUSE SMPPPD সংযোগ অবস্থা
+-Name[ca]=Estatus de la connexió SUSE SMPPPD 
+-Name[cs]=Stav spojení SUSE SMPPPD
+-Name[da]=SUSE SMPPD Forbindelsesstatus
+-Name[de]=SuSE SMPPPD-Verbindungsstatus
+-Name[el]=Κατάσταση σύνδεσης του SuSE SMPPPD
+-Name[es]=Estado de conexión de SUSE SMPPPD
+-Name[et]=SUSE SMPPPD ühenduse staatus
+-Name[eu]=SUSE SMPPPD konexioaren egoera
+-Name[fi]=SUSE SMPPPD -yhteyden tila
+-Name[fr]=État de la connexion SUSE SMPPPD
+-Name[ga]=Stádas Ceangail SUSE SMPPPD
+-Name[gl]=Estado da conexión de SUSE SMPPPD
+-Name[he]=מצב החיבור של SUSE SMPPPD
+-Name[hu]=SUSE SMPPPD kapcsolati állapot
+-Name[is]=SUSE SMPPPD tengingarstaða
+-Name[it]=Stato della connessione di SUSE SMPPPD
+-Name[lt]=SUSE SMPPPD ryšio būklė
+-Name[nb]=Tilstand for SUSE-SMPPPD-forbindelsen
+-Name[nl]=SUSE SMPPPD-verbindingsstatus
+-Name[nn]=Tilstand for SUSE-SMPPPD-sambandet
+-Name[pl]=Status połączenia SUSE SMPPPD
+-Name[pt]=Estado da Ligação SUSE SMPPPD
+-Name[pt_BR]=Status da Conexão SUSE SMPPPD
+-Name[ru]=Статус соединения SUSE SMPPPD
+-Name[sl]=Stanje povezave z uporabo SuSE SMPPPD
+-Name[sr]=Статус SUSE-ове SMPPPD везе
+-Name[sr at Latn]=Status SUSE-ove SMPPPD veze
+-Name[sv]=SUSE SMPPPD anslutningsstatus
+-Name[tr]=SUSE SMPPPD bağlantı durumu
+-Name[uk]=Стан з'єднання SUSE SMPPPD
+-Name[zh_CN]=SUSE SMPPPD 连接状态
+-Name[zh_HK]=SUSE SMPPPD 連線狀態
+-Comment=SMPPPDCS Plugin
+-Comment[bn]=SMPPPDCS প্লাগিন
+-Comment[br]=Lugant SMPPPDCS
+-Comment[ca]=Connector SMPPPDCS
+-Comment[cs]=SMPPPDCS modul
+-Comment[da]=SMPPPDCS-Plugin
+-Comment[de]=SMPPPDCS-Modul
+-Comment[el]=Πρόσθετο SMPPPDCS
+-Comment[es]=Extensión SMPPPDCS
+-Comment[et]=SMPPPDCS plugin
+-Comment[eu]=SMPPPDCS plugin-a
+-Comment[fi]=SMPPPDCS-liitännäinen
+-Comment[fr]=Module SMPPPDCS
+-Comment[ga]=Breiseán SMPPPDCS
+-Comment[gl]=Plugin SMPPPDCS
+-Comment[he]=תוסף SMPPPDCS
+-Comment[hu]=SMPPPDCS bővítőmodul
+-Comment[is]=SMPPPDCS íforrit
+-Comment[it]=Plugin SMPPPDCS
+-Comment[lt]=SMPPPDCS įskiepis
+-Comment[nb]=Programtillegg for SMPPPDCS
+-Comment[nl]=SMPPPDCS-plugin
+-Comment[nn]=Programtillegg for SMPPPDCS
+-Comment[pl]=Wtyczka SMPPPDCS
+-Comment[pt]='Plugin' SMPPPDCS
+-Comment[pt_BR]=Plugin SMPPPDCS
+-Comment[ro]=Modul SMPPPDCS
+-Comment[ru]=Модуль SMPPPDCS
+-Comment[sl]=Vstavek SMPPPDCS
+-Comment[sr]=Прикључак SMPPPDCS
+-Comment[sr at Latn]=Priključak SMPPPDCS
+-Comment[sv]=SMPPPDCS-insticksprogram
+-Comment[tr]=SMPPPDCS Eklentisi
+-Comment[uk]=Втулок SMPPPDCS
+-Comment[uz]=SMPPPDCS плагини
+-Comment[zh_CN]=SMPPPDCS 插件
+-Comment[zh_HK]=SMPPPDCS 插件
+--- kopete/plugins/smpppdcs/smpppdcsprefsimpl.h	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsprefsimpl.h	(revision 504660)
+@@ -1,76 +0,0 @@
+-/*
+-    smpppdcsprefsimpl.h
+- 
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+- 
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#ifndef SMPPPDCSPREFSIMPL_H
+-#define SMPPPDCSPREFSIMPL_H
+-
+-#include <qgroupbox.h>
+-
+-#include <kprogress.h>
+-
+-#include "smpppdcsprefs.h"
+-
+-class SMPPPDCSPlugin;
+-class SMPPPDSearcher;
+-
+-/**
+- at author Heiko Sch&auml;fer <heiko at rangun.de>
+-*/
+-class SMPPPDCSPrefs : public SMPPPDCSPrefsBase 
+-{
+-	Q_OBJECT
+-
+-	SMPPPDCSPrefs(const SMPPPDCSPrefs&);
+-	SMPPPDCSPrefs& operator=(const SMPPPDCSPrefs&);
+-	
+-public:
+-
+-    SMPPPDCSPrefs(QWidget* parent, const char* name = 0, WFlags fl = 0);
+-    ~SMPPPDCSPrefs();
+-
+-signals:
+-	void foundSMPPPD(bool found);
+-	
+-protected slots:
+-    void enableSMPPPDSettings();
+-    void disableSMPPPDSettings();
+-    void determineCSType();
+-    void smpppdFound(const QString & host);
+-    void smpppdNotFound();
+-	void scanStarted(uint total);
+-	void scanProgress(uint cur);
+-	void scanFinished();
+-	void cancelScanning();
+-
+-private:
+-	SMPPPDCSPlugin  * m_plugin;
+-	KProgressDialog * m_scanProgressDlg;
+-	SMPPPDSearcher  * m_curSearcher;
+-};
+-
+-inline void SMPPPDCSPrefs::enableSMPPPDSettings() {
+-	smpppdPrefs->setEnabled(true);
+-}
+-
+-inline void SMPPPDCSPrefs::disableSMPPPDSettings() {
+-	smpppdPrefs->setEnabled(false);
+-}
+-
+-inline void SMPPPDCSPrefs::scanFinished() {
+-	m_scanProgressDlg->hide();
+-}
+-
+-#endif
+--- kopete/plugins/smpppdcs/smpppdcspreferences.h	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcspreferences.h	(revision 504660)
+@@ -1,77 +0,0 @@
+-/*
+-    smpppdcspreferences.h
+- 
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+- 
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#ifndef SMPPPDCSPREFERENCES_H
+-#define SMPPPDCSPREFERENCES_H
+-
+-#include <kcmodule.h>
+-
+-class QListViewItem;
+-
+-class SMPPPDCSPrefs;
+-
+-class AccountPrivMap {
+-public:
+-	AccountPrivMap(bool isOn = FALSE, const QString& id = QString::null)
+-	 : m_on(isOn), m_id(id) {}
+-	bool m_on;
+-	QString m_id;
+-};
+-
+-/**
+- * @brief Module for the configuration of the smpppdcs-plugin
+- *
+- * @author Heiko Sch&auml;fer <heiko at rangun.de>
+- */
+-class SMPPPDCSPreferences : public KCModule {
+-    Q_OBJECT
+-
+-    SMPPPDCSPreferences(const SMPPPDCSPreferences&);
+-    SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&);
+-
+-public:
+-	typedef QMap<QString, AccountPrivMap> AccountMap;
+-
+-    /**
+-     * @brief Creates an <code>SMPPPDCSPreferences</code> instance
+-     */
+-    SMPPPDCSPreferences(QWidget * parent = 0, const char * name = 0, const QStringList &args = QStringList());
+-	
+-	/**
+-     * @brief Destroys an <code>SMPPPDCSPreferences</code> instance
+-     */
+-    virtual ~SMPPPDCSPreferences();
+-
+-	virtual void load();
+-	virtual void save();
+-	virtual void defaults();
+-	
+-protected slots:
+-	void listClicked(QListViewItem * item);
+-
+-private slots:
+-	void slotModified();
+-	
+-protected:
+-
+-	/// The UI class generated by the QT-designer
+-    SMPPPDCSPrefs * m_ui;
+-	
+-	AccountMap m_accountMapOld;
+-	AccountMap m_accountMapCur;
+-};
+-
+-#endif
+--- kopete/plugins/smpppdcs/smpppdsearcher.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdsearcher.cpp	(revision 504660)
+@@ -1,189 +0,0 @@
+-/*
+-    smpppdsearcher.h
+- 
+-    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
+- 
+-    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-    *                                                                       *
+-    *************************************************************************
+-*/
+-
+-#include <qregexp.h>
+-#include <qfile.h>
+-
+-#include <kprocess.h>
+-#include <kdebug.h>
+-
+-#include "smpppdclient.h"
+-#include "smpppdsearcher.h"
+-
+-SMPPPDSearcher::SMPPPDSearcher()
+-        : m_cancelSearchNow(FALSE),
+-        m_procIfconfig(NULL),
+-m_procNetstat(NULL) {}
+-
+-SMPPPDSearcher::~SMPPPDSearcher() {
+-    delete m_procIfconfig;
+-    delete m_procNetstat;
+-}
+-
+-/*!
+-    \fn SMPPPDSearcher::searchNetwork() const
+- */
+-void SMPPPDSearcher::searchNetwork() {
+-    kdDebug(14312) << k_funcinfo << endl;
+-
+-    // the first point to search is localhost
+-    if(!scan("127.0.0.1", "255.0.0.0")) {
+-
+-        m_procNetstat  = new KProcess;
+-        m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output
+-
+-        *m_procNetstat << "/bin/netstat" << "-rn";
+-        connect(m_procNetstat, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int)));
+-        if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) {
+-            kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl;
+-
+-            emit smpppdNotFound();
+-        }
+-
+-        delete m_procNetstat;
+-        m_procNetstat = NULL;
+-    }
+-}
+-
+-/*!
+-    \fn SMPPPDSearcher::slotStdoutReceived(KProcess * proc, char * buf, int len)
+- */
+-void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) {
+-    kdDebug(14312) << k_funcinfo << endl;
+-
+-    QString myBuf = QString::fromLatin1(buf,len);
+-    QRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})");
+-    // tokenize the string into lines
+-    QStringList toks = QStringList::split("\n", myBuf);
+-    for(QStringList::size_type i = 0; i < toks.count(); i++) {
+-        if(rex.exactMatch(toks[i])) {
+-            if(scan(rex.cap(1), rex.cap(2))) {
+-                return;
+-            }
+-        }
+-    }
+-
+-    emit smpppdNotFound();
+-}
+-void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) {
+-    kdDebug(14312) << k_funcinfo << endl;
+-
+-    QRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*");
+-    QString myBuf = QString::fromLatin1(buf,len);
+-
+-    if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) {
+-        // if netstat -r found no gateway we search the network
+-        m_procIfconfig = new KProcess;
+-        m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output
+-
+-        *m_procIfconfig << "/sbin/ifconfig";
+-        connect(m_procIfconfig, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int)));
+-        if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) {
+-            kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl;
+-
+-            emit smpppdNotFound();
+-        }
+-
+-        delete m_procIfconfig;
+-        m_procIfconfig = NULL;
+-    }
+-}
+-
+-/*!
+-    \fn SMPPPDSearcher::scan() const
+- */
+-bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) {
+-    kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl;
+-	
+-	SMPPPD::Client client;
+-	
+-	if(ip == "127.0.0.1") { // if localhost, we only scan this one host
+-		if(client.connect(ip, 3185)) {
+-			client.disconnect();
+-			emit smpppdFound(ip);
+-			return true;
+-		}
+-		
+-		return false;
+-	}
+-
+-    uint min_range = 0;
+-    uint max_range = 255;
+-
+-    // calculate ip range (only last mask entry)
+-    QRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})");
+-    if(lastRex.exactMatch(ip)) {
+-
+-        uint lastWordIP = lastRex.cap(4).toUInt();
+-
+-        QStringList ipToks;
+-        for(int i = 1; i < 5; i++) {
+-            ipToks.push_back(lastRex.cap(i));
+-        }
+-
+-        if(lastRex.exactMatch(mask)) {
+-            uint lastWordMask = lastRex.cap(4).toUInt();
+-
+-            if(lastWordMask == 0) {
+-                kdDebug(14312) << k_funcinfo << "IP-Range: " << ipToks[0] << "." << ipToks[1] << "." <<  ipToks[2] << ".0 - " << ipToks[0] << "." << ipToks[1] << "." << ipToks[2] << ".255" << endl;
+-                max_range = 255;
+-            } else if(lastWordMask == 255) {
+-                min_range = max_range = lastWordIP;
+-            } else {
+-                kdDebug(14312) << k_funcinfo << "IP-Range: " << ipToks[0] << "." << ipToks[1] << "." <<  ipToks[2] << ".0 - " << ipToks[0] << "." << ipToks[1] << "." << ipToks[2] << "." << lastWordMask << endl;
+-                max_range = lastWordMask;
+-            }
+-        }
+-
+-        uint range = max_range - min_range;
+-        m_cancelSearchNow = FALSE;
+-        if(range > 1) {
+-            emit scanStarted(max_range);
+-        }
+-        for(uint i = min_range; i <= max_range; i++) {
+-            if(m_cancelSearchNow) {
+-                if(range > 1) {
+-                    emit scanFinished();
+-                }
+-                break;
+-            }
+-            if(range > 1) {
+-                emit scanProgress(i);
+-            }
+-			
+-			if(client.connect(QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)), 3185)) {
+-				client.disconnect();
+-				emit smpppdFound(ip);
+-                if(range > 1) {
+-                    emit scanFinished();
+-                }
+-                return true;
+-			} 
+-#ifndef NDEBUG
+-			else {
+-				kdDebug(14312) << k_funcinfo << "No smpppd found at " << QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)) << endl;
+-			}
+-#endif
+-        }
+-        if(range > 1) {
+-            emit scanFinished();
+-        }
+-    }
+-
+-    return false;
+-}
+-
+-#include "smpppdsearcher.moc"
+--- kopete/plugins/smpppdcs/smpppdcsprefs.ui	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsprefs.ui	(revision 504660)
+@@ -1,284 +0,0 @@
+-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+-<class>SMPPPDCSPrefsBase</class>
+-<author>Heiko Schaefer</author>
+-<widget class="QWidget">
+-    <property name="name">
+-        <cstring>SMPPPDCSPrefsBase</cstring>
+-    </property>
+-    <property name="geometry">
+-        <rect>
+-            <x>0</x>
+-            <y>0</y>
+-            <width>476</width>
+-            <height>225</height>
+-        </rect>
+-    </property>
+-    <property name="caption">
+-        <string>SMPPPDCS Preferences</string>
+-    </property>
+-    <vbox>
+-        <property name="name">
+-            <cstring>unnamed</cstring>
+-        </property>
+-        <widget class="QTabWidget">
+-            <property name="name">
+-                <cstring>tabWidget</cstring>
+-            </property>
+-            <widget class="QWidget">
+-                <property name="name">
+-                    <cstring>tab</cstring>
+-                </property>
+-                <attribute name="title">
+-                    <string>&amp;Connection</string>
+-                </attribute>
+-                <vbox>
+-                    <property name="name">
+-                        <cstring>unnamed</cstring>
+-                    </property>
+-                    <widget class="QLayoutWidget">
+-                        <property name="name">
+-                            <cstring>layout4</cstring>
+-                        </property>
+-                        <vbox>
+-                            <property name="name">
+-                                <cstring>unnamed</cstring>
+-                            </property>
+-                            <property name="margin">
+-                                <number>6</number>
+-                            </property>
+-                            <property name="spacing">
+-                                <number>6</number>
+-                            </property>
+-                            <widget class="QButtonGroup">
+-                                <property name="name">
+-                                    <cstring>csMethod</cstring>
+-                                </property>
+-                                <property name="title">
+-                                    <string>Method of Connection Status Detection</string>
+-                                </property>
+-                                <vbox>
+-                                    <property name="name">
+-                                        <cstring>unnamed</cstring>
+-                                    </property>
+-                                    <property name="margin">
+-                                        <number>6</number>
+-                                    </property>
+-                                    <property name="spacing">
+-                                        <number>6</number>
+-                                    </property>
+-                                    <widget class="QRadioButton">
+-                                        <property name="name">
+-                                            <cstring>useNetstat</cstring>
+-                                        </property>
+-                                        <property name="text">
+-                                            <string>&amp;netstat - Standard method of connection status detection</string>
+-                                        </property>
+-                                        <property name="checked">
+-                                            <bool>true</bool>
+-                                        </property>
+-                                        <property name="toolTip" stdset="0">
+-                                            <string>Uses the netstat command to find a gateway; suitable on dial-up computers</string>
+-                                        </property>
+-                                    </widget>
+-                                    <widget class="QRadioButton">
+-                                        <property name="name">
+-                                            <cstring>useSmpppd</cstring>
+-                                        </property>
+-                                        <property name="text">
+-                                            <string>smpppd - Ad&amp;vanced method of connection status detection</string>
+-                                        </property>
+-                                        <property name="toolTip" stdset="0">
+-                                            <string>Uses the smpppd on a gateway; suitable for a computer in a private network</string>
+-                                        </property>
+-                                    </widget>
+-                                    <widget class="QLayoutWidget">
+-                                        <property name="name">
+-                                            <cstring>autoCSLayout</cstring>
+-                                        </property>
+-                                        <hbox>
+-                                            <property name="name">
+-                                                <cstring>unnamed</cstring>
+-                                            </property>
+-                                            <widget class="KPushButton">
+-                                                <property name="name">
+-                                                    <cstring>autoCSTest</cstring>
+-                                                </property>
+-                                                <property name="text">
+-                                                    <string>&amp;Try to Detect Automatically</string>
+-                                                </property>
+-                                                <property name="toolTip" stdset="0">
+-                                                    <string>Tries to find an appropriate connection method</string>
+-                                                </property>
+-                                            </widget>
+-                                            <spacer>
+-                                                <property name="name">
+-                                                    <cstring>spacer4</cstring>
+-                                                </property>
+-                                                <property name="orientation">
+-                                                    <enum>Horizontal</enum>
+-                                                </property>
+-                                                <property name="sizeType">
+-                                                    <enum>Expanding</enum>
+-                                                </property>
+-                                                <property name="sizeHint">
+-                                                    <size>
+-                                                        <width>341</width>
+-                                                        <height>20</height>
+-                                                    </size>
+-                                                </property>
+-                                            </spacer>
+-                                        </hbox>
+-                                    </widget>
+-                                </vbox>
+-                            </widget>
+-                            <widget class="QGroupBox">
+-                                <property name="name">
+-                                    <cstring>smpppdPrefs</cstring>
+-                                </property>
+-                                <property name="enabled">
+-                                    <bool>false</bool>
+-                                </property>
+-                                <property name="title">
+-                                    <string>Location of the SMPPPD</string>
+-                                </property>
+-                                <vbox>
+-                                    <property name="name">
+-                                        <cstring>unnamed</cstring>
+-                                    </property>
+-                                    <property name="margin">
+-                                        <number>6</number>
+-                                    </property>
+-                                    <property name="spacing">
+-                                        <number>6</number>
+-                                    </property>
+-                                    <widget class="SMPPPDLocationWidget">
+-                                        <property name="name">
+-                                            <cstring>SMPPPDLocation</cstring>
+-                                        </property>
+-                                    </widget>
+-                                </vbox>
+-                            </widget>
+-                            <spacer>
+-                                <property name="name">
+-                                    <cstring>spacer18</cstring>
+-                                </property>
+-                                <property name="orientation">
+-                                    <enum>Vertical</enum>
+-                                </property>
+-                                <property name="sizeType">
+-                                    <enum>Expanding</enum>
+-                                </property>
+-                                <property name="sizeHint">
+-                                    <size>
+-                                        <width>20</width>
+-                                        <height>20</height>
+-                                    </size>
+-                                </property>
+-                            </spacer>
+-                        </vbox>
+-                    </widget>
+-                </vbox>
+-            </widget>
+-            <widget class="QWidget">
+-                <property name="name">
+-                    <cstring>tab</cstring>
+-                </property>
+-                <attribute name="title">
+-                    <string>Acco&amp;unts</string>
+-                </attribute>
+-                <vbox>
+-                    <property name="name">
+-                        <cstring>unnamed</cstring>
+-                    </property>
+-                    <property name="spacing">
+-                        <number>6</number>
+-                    </property>
+-                    <spacer>
+-                        <property name="name">
+-                            <cstring>spacer4_2</cstring>
+-                        </property>
+-                        <property name="orientation">
+-                            <enum>Vertical</enum>
+-                        </property>
+-                        <property name="sizeType">
+-                            <enum>Fixed</enum>
+-                        </property>
+-                        <property name="sizeHint">
+-                            <size>
+-                                <width>20</width>
+-                                <height>6</height>
+-                            </size>
+-                        </property>
+-                    </spacer>
+-                    <widget class="QLabel">
+-                        <property name="name">
+-                            <cstring>toIgnoreLabel</cstring>
+-                        </property>
+-                        <property name="text">
+-                            <string>Choose the accounts to ignore:</string>
+-                        </property>
+-                    </widget>
+-                    <widget class="KListView">
+-                        <column>
+-                            <property name="text">
+-                                <string>Account</string>
+-                            </property>
+-                            <property name="clickable">
+-                                <bool>true</bool>
+-                            </property>
+-                            <property name="resizable">
+-                                <bool>false</bool>
+-                            </property>
+-                        </column>
+-                        <property name="name">
+-                            <cstring>accountList</cstring>
+-                        </property>
+-                        <property name="allColumnsShowFocus">
+-                            <bool>true</bool>
+-                        </property>
+-                        <property name="resizeMode">
+-                            <enum>LastColumn</enum>
+-                        </property>
+-                    </widget>
+-                </vbox>
+-            </widget>
+-        </widget>
+-    </vbox>
+-</widget>
+-<customwidgets>
+-    <customwidget>
+-        <class>SMPPPDLocationWidget</class>
+-	<header location="local">smpppdlocationwidget.h</header>
+-        <sizehint>
+-            <width>16</width>
+-            <height>16</height>
+-        </sizehint>
+-        <container>1</container>
+-        <sizepolicy>
+-            <hordata>5</hordata>
+-            <verdata>5</verdata>
+-            <horstretch>0</horstretch>
+-            <verstretch>0</verstretch>
+-        </sizepolicy>
+-        <pixmap>image0</pixmap>
+-    </customwidget>
+-</customwidgets>
+-<images>
+-    <image name="image0">
+-        <data format="PNG" length="1125">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042c49444154388db5954f6c14551cc73fefcd7476b65bdaae4bb78bb5502a14d404e4801c88182d1c4c2c693da847400f9c24c68b878684238660e2b1e01f12c19493012ef2478c814412d354a46017a8a564bb6da5bbedccee767776e63d0ffb073751d483bfe49799974c3eeffb7ebf37df9fd05a530b2184040cc0042420aaf9a4d0d554800f045a6b256ae0e1e1e1d6bebebe838ee31c48a7d39b5cd7fd075e251cc7617272f2ded8d8d819cff33e0316819259537aead4a9839d5dd6d1784f91f55b0a94830242088404d304292bef68a89f520802a598fecddaa04f1a876f5c250c7c0a64cdeac686e33807e23d45e6b297c8b877f1831542614550b6599835c83c2a81b6786a75134faf2f1169f12997350881d9021d0903e06de0745d3160a6d3e94dbd5b0a64dcbb94b5831d0e3375ab892b1772dcf9790528543f8dd0d367b36768153b5e31503a0f1aecb004580b44ffac58baae8b1714f0833c7638cc8dab303a320f4822ab4c7a37c69196203de3319d5ce1c4d13c733331dedc67a129a154fd128401ab0616d55a130ac3d42d93d1913940d13fd0c9ee0183685c60da01c5421bd72f7a8c8efccef9afd374267ad93d642365be0636a0d28ec7600941d9e6f23917f0e97f23ce5bef35d19ec863da0ed9059b2be70bec196c66dfa10ec0e49b338f7017258651bf95021035c595429bb0903248fe52a2b5b595dd7b4d945cc2340cdca536be389ee3f67886c5798f773fe8e0dac508c989659277a2180da4ca4ff07821058b8b251445d63d6b13ed1098a6417e39cac85197dbe31962ab9bd9f1f22a226d45366f6d0620fdb08c900d281af6110284b20085b414861d905d88f2e52739ee8cbb8022143259d3dd84691730aa2d52da441a8de0c6958068870022a41e9629ad3473fd3b8fdbe319dadb9b4924da994d2d716c7896fbe35152f78b48245d6b2da4507faf582be8eaf159b721cc837b05ae7debb1f79d08cb8b515edad942a22bc4b1c33eb3d34b1c797f06af90a72d16e2f96d9a74aa11dca8586b222d01af0fb60070f6c402d72f15d97f28c6f6d7027a5f5ce6c3233dc4e2ede496b278be4fff608cee8d3e1add806aeca51094cbb06397c1ecc328e746537c7e3ccdb5cb1136bf60635882d4d41c6ec6836ab37efa214f72208ed9f4d7cdd38ee310280542e38b1c43fb6de26b3672e1ec3cc99bcb246f66a938a3241ab3e91f7c861fbf77710b1e5e49915bae974203ba0e9e9c9cbc373d6d6d305a040a89c2a77f50b27d5782bbbf7acccf28349235dd16cf6dd374f7295e1de8a45c02d37499182b01cc0201a085d61a2144d8b2ac8fb6ed340e77240c4261890e04c250185262546d534a032154b59e0ad394e41c98182bf268ce6721ed9f064e0253356f6da2e24c1f030f783c15fe6da680af8021602bd051532ca9b8521488559f61aa86c29343578fbf0264a94c906c7d3409214c20043457a116ff6de6795578012889ff6b98fe016ea0ce1c6a2573410000000049454e44ae426082</data>
+-    </image>
+-</images>
+-<tabstops>
+-    <tabstop>tabWidget</tabstop>
+-    <tabstop>useNetstat</tabstop>
+-    <tabstop>autoCSTest</tabstop>
+-    <tabstop>useSmpppd</tabstop>
+-    <tabstop>accountList</tabstop>
+-</tabstops>
+-<layoutdefaults spacing="0" margin="0"/>
+-<includehints>
+-    <includehint>kpushbutton.h</includehint>
+-    <includehint>smpppdlocationwidget.h</includehint>
+-    <includehint>klistview.h</includehint>
+-</includehints>
+-</UI>
+--- kopete/plugins/smpppdcs/detectornetworkstatus.h	(revision 502708)
++++ kopete/plugins/smpppdcs/detectornetworkstatus.h	(revision 504660)
+@@ -1,50 +0,0 @@
+-/*
+-	detectornetworkstatus.h
+-
+-	Copyright (c) 2006      by Heiko Schaefer        <heiko at rangun.de>
+-
+-	Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
+-	*                                                                       *
+-	*************************************************************************
+-*/
+-
+-#ifndef DETECTORNETWORKSTATUS_H
+-#define DETECTORNETWORKSTATUS_H
+-
+-#include <qobject.h>
+-
+-#include "detector.h"
+-
+-class IConnector;
+-class ConnectionManager;
+-
+-/**
+-	@author Heiko Sch&auml;fer <heiko at rangun.de>
+-*/
+-class DetectorNetworkStatus : protected QObject, public Detector
+-{
+-	Q_OBJECT
+-	
+-	DetectorNetworkStatus(const DetectorNetworkStatus&);
+-	DetectorNetworkStatus& operator=(const DetectorNetworkStatus&);
+-
+-public:
+-    DetectorNetworkStatus(IConnector* connector);
+-    virtual ~DetectorNetworkStatus();
+-	
+-	virtual void checkStatus() const;
+-
+-protected slots:
+-	void statusChanged(const QString& host, NetworkStatus::EnumStatus status);
+-	
+-private:
+-	ConnectionManager * m_connManager;
+-};
+-
+-#endif
+--- kopete/plugins/smpppdcs/Changelog.smpppdcs	(revision 502708)
++++ kopete/plugins/smpppdcs/Changelog.smpppdcs	(revision 504660)
+@@ -15,22 +15,15 @@
+ Changelog
+ =========
+ 
+-0.79 (2006/01/25)
+-* using KConfigXT for configuration
+-* using dcopidl2cpp stub generated from kinternetiface.h (from kinternet package),
+-  no more own implementation
+-* experimental implementation of the the KDED-NetworkStatus (not active, yet)
+-* significantly speeded up automatic detection of a SMPPPD
+-* BUGFIX: reloading the plugin in a already running Kopete will no more 
+-  result in an inactive plugin
++0.79 (2006/01/18)
+ * refactoring to allow easy implementation of new detection methods
+-* even more speed improvements
++* speed improvements
+ 
+ 0.75 (2006/01/01)
+ * use of KSocketStream instead of deprecated KExtendedSocket
+ * progressbar while searching for an smpppd on the local network
+ * automatically found smpppd server is resolved via DNS
+-* Fixed Bug 111369: better detection of a SMPPPD and no more freeze of Kopete
++* Fixed Bug 111369: better detection of SMPPPD and no more freeze of Kopete
+ 
+ 0.74 (2005/12/27)
+ * minor bugfixes
+@@ -45,7 +38,7 @@
+   Accounts can be excluded from the plugin connect/disconnect
+   mechanism
+ * connection detection enhanced: first kinternet is asked via
+-  DCOP for a running connection, if this fails the smpppd is asked
++  DCOP for a running connection, if this fails smpppdcs is asked
+ * improved startup detection, compatible with recent CVS changes
+ * some API chages in the config module
+ 
+--- kopete/plugins/smpppdcs/detectorsmpppd.h	(revision 502708)
++++ kopete/plugins/smpppdcs/detectorsmpppd.h	(revision 504660)
+@@ -34,13 +34,14 @@
+ 
+     DetectorSMPPPD(const DetectorSMPPPD&);
+     DetectorSMPPPD& operator=(const DetectorSMPPPD&);
+-
++	
+ public:
+     DetectorSMPPPD(IConnector* connector);
+     virtual ~DetectorSMPPPD();
+ 
+-    virtual void checkStatus() const;
+-
++    virtual void checkStatus();
++	
++	virtual void smpppdServerChange();
+ };
+ 
+ #endif
+--- kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h	(revision 502708)
++++ kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h	(revision 504660)
+@@ -43,19 +43,19 @@
+     bool connect(const QString& server, uint port = 3185);
+     void disconnect();
+ 
+-    QStringList getInterfaceConfigurations();
+-    bool statusInterface(const QString& ifcfg);
+-
++	QStringList getInterfaceConfigurations();
++	bool statusInterface(const QString& ifcfg);
++	
+     bool isOnline();
+     QString serverID() const;
+     QString serverVersion() const;
++	
++	void setPassword(const QString& password);
+ 
+-    void setPassword(const QString& password);
+-
+ private:
+     friend class State;
+-
+-    void changeState(State * newState);
++    
++	void changeState(State * newState);
+     QStringList read() const;
+     void write(const char * cmd);
+ 
+@@ -64,7 +64,7 @@
+     KNetwork::KStreamSocket * m_sock;
+     QString m_serverID;
+     QString m_serverVer;
+-    QString m_password;
++	QString m_password;
+ };
+ 
+ inline void Client::changeState(State * newState) {
+@@ -72,7 +72,7 @@
+ }
+ 
+ inline void Client::setPassword(const QString& password) {
+-    m_password = password;
++	m_password = password;
+ }
+ 
+ };
+--- kopete/plugins/smpppdcs/libsmpppdclient/Makefile.am	(revision 502708)
++++ kopete/plugins/smpppdcs/libsmpppdclient/Makefile.am	(revision 504660)
+@@ -7,4 +7,4 @@
+ libsmpppdclient_la_SOURCES = smpppdclient.cpp smpppdstate.cpp smpppdready.cpp \
+ 	smpppdunsettled.cpp
+ 
+-libsmpppdclient_la_LIBADD = -lcrypto
++libsmpppdclient_la_LIBADD = -lcrypto
+\ No newline at end of file
+--- kopete/plugins/smpppdcs/iconnector.h	(revision 502708)
++++ kopete/plugins/smpppdcs/iconnector.h	(revision 504660)
+@@ -28,7 +28,7 @@
+ 
+ public:
+     IConnector() {}
+-
++    ;
+     virtual ~IConnector() {}
+ 
+     /**
+--- kopete/plugins/smpppdcs/smpppdcsplugin.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsplugin.cpp	(revision 504660)
+@@ -22,47 +22,33 @@
+ #include <qtimer.h>
+ 
+ #include <kdebug.h>
++#include <kconfig.h>
+ #include <kgenericfactory.h>
+ 
+ #include "kopeteprotocol.h"
+-#include "networkstatuscommon.h"
+ #include "kopetepluginmanager.h"
+ #include "kopeteaccountmanager.h"
+ 
+-#include "detectornetworkstatus.h"
+ #include "detectornetstat.h"
+ #include "detectorsmpppd.h"
+-#include "smpppdcsconfig.h"
+ 
+ typedef KGenericFactory<SMPPPDCSPlugin> SMPPPDCSPluginFactory;
+ K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs"))
+ 
+ SMPPPDCSPlugin::SMPPPDCSPlugin(QObject *parent, const char * name, const QStringList& /* args */)
+         : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name),
+-        m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL),
++        m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_timer(NULL),
+ m_onlineInquiry(NULL) {
+ 
+-    kdDebug(14312) << k_funcinfo << endl;
+-
+     m_pluginConnected = false;
+ 
+-    m_onlineInquiry   = new OnlineInquiry();
+-    m_detectorSMPPPD  = new DetectorSMPPPD(this);
+-    m_detectorNetstat = new DetectorNetstat(this);
+-
+-    // experimental, not used yet
+-    m_detectorNetworkStatus = new DetectorNetworkStatus(this);
+-
+-    // we wait for the allPluginsLoaded signal, to connect
+-    // as early as possible after startup, but not before
+-    // all accounts are ready
++    // we wait for the allPluginsLoaded signal, to connect as early as possible after startup
+     connect(Kopete::PluginManager::self(), SIGNAL(allPluginsLoaded()),
+             this, SLOT(allPluginsLoaded()));
+ 
+-    // if kopete was already running and the plugin
+-    // was loaded later, we check once after 15 secs
+-    // if all other plugins have been loaded
+-    QTimer::singleShot(15000, this, SLOT(allPluginsLoaded()));
++    m_onlineInquiry   = new OnlineInquiry();
++    m_detectorSMPPPD  = new DetectorSMPPPD(this);
++    m_detectorNetstat = new DetectorNetstat(this);
+ }
+ 
+ SMPPPDCSPlugin::~SMPPPDCSPlugin() {
+@@ -72,38 +58,30 @@
+     delete m_timer;
+     delete m_detectorSMPPPD;
+     delete m_detectorNetstat;
+-    delete m_detectorNetworkStatus;
+     delete m_onlineInquiry;
+ }
+ 
+ void SMPPPDCSPlugin::allPluginsLoaded() {
+ 
+-    if(Kopete::PluginManager::self()->isAllPluginsLoaded()) {
+-        m_timer = new QTimer();
+-        connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCheckStatus()));
++    m_timer = new QTimer();
++    connect( m_timer, SIGNAL( timeout() ), this, SLOT( slotCheckStatus() ) );
+ 
+-		if(SMPPPDCSConfig::self()->useSmpppd()) {
+-            m_timer->start(30000);
+-        } else {
+-            // we use 1 min interval, because it reflects
+-            // the old connectionstatus plugin behaviour
+-            m_timer->start(60000);
+-        }
+-
+-        slotCheckStatus();
++    if(useSmpppd()) {
++        m_timer->start(30000);
++    } else {
++        // we use 1 min interval, because it reflects the old connectionstatus plugin behaviour
++        m_timer->start(60000);
+     }
++
++    slotCheckStatus();
+ }
+ 
+-bool SMPPPDCSPlugin::isOnline() const {
+-	return m_onlineInquiry->isOnline(SMPPPDCSConfig::self()->useSmpppd());
++bool SMPPPDCSPlugin::isOnline() {
++    return m_onlineInquiry->isOnline(useSmpppd());
+ }
+ 
+ void SMPPPDCSPlugin::slotCheckStatus() {
+-	
+-	// reread config to get changes
+-	SMPPPDCSConfig::self()->readConfig();
+-	
+-	if(SMPPPDCSConfig::self()->useSmpppd()) {
++    if(useSmpppd()) {
+         m_detectorSMPPPD->checkStatus();
+     } else {
+         m_detectorNetstat->checkStatus();
+@@ -136,56 +114,48 @@
+ }
+ 
+ void SMPPPDCSPlugin::connectAllowed() {
++    static KConfig *config = KGlobal::config();
++    config->setGroup(SMPPPDCS_CONFIG_GROUP);
++    QStringList list = config->readListEntry("ignoredAccounts");
+ 
+-	QStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
+-
+     Kopete::AccountManager * m = Kopete::AccountManager::self();
+     for(QPtrListIterator<Kopete::Account> it(m->accounts())
+             ;
+             it.current();
+             ++it) {
+-
+-#ifndef NDEBUG
+-        if(it.current()->inherits("Kopete::ManagedConnectionAccount")) {
+-            kdDebug(14312) << k_funcinfo << "Account " << it.current()->protocol()->pluginId() + "_" + it.current()->accountId() << " is an managed account!" << endl;
+-        } else {
+-            kdDebug(14312) << k_funcinfo << "Account " << it.current()->protocol()->pluginId() + "_" + it.current()->accountId() << " is an unmanaged account!" << endl;
+-        }
+-#endif
+-
+-        if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()->
+-                          accountId())) {
++        if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()->accountId())) {
+             it.current()->connect();
+         }
+     }
+ }
+ 
+ void SMPPPDCSPlugin::disconnectAllowed() {
++    static KConfig *config = KGlobal::config();
++    config->setGroup(SMPPPDCS_CONFIG_GROUP);
++    QStringList list = config->readListEntry("ignoredAccounts");
+ 
+-	QStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
+-
+     Kopete::AccountManager * m = Kopete::AccountManager::self();
+     for(QPtrListIterator<Kopete::Account> it(m->accounts())
+             ;
+             it.current();
+             ++it) {
+-
+-#ifndef NDEBUG
+-        if(it.current()->inherits("Kopete::ManagedConnectionAccount")) {
+-            kdDebug(14312) << k_funcinfo << "Account " << it.current()->protocol()->pluginId() + "_" + it.current()->accountId() << " is an managed account!" << endl;
+-        } else {
+-            kdDebug(14312) << k_funcinfo << "Account " << it.current()->protocol()->pluginId() + "_" + it.current()->accountId() << " is an unmanaged account!" << endl;
+-        }
+-#endif
+-
+         if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()->accountId())) {
+             it.current()->disconnect();
+         }
+     }
+ }
+ 
++/*!
++    \fn SMPPPDCSPlugin::useSmpppd() const
++ */
++bool SMPPPDCSPlugin::useSmpppd() const {
++    static KConfig *config = KGlobal::config();
++    config->setGroup(SMPPPDCS_CONFIG_GROUP);
++    return config->readBoolEntry("useSmpppd", false);
++}
++
+ QString SMPPPDCSPlugin::detectionMethod() const {
+-	if(SMPPPDCSConfig::self()->useSmpppd()) {
++    if(useSmpppd()) {
+         return "smpppd";
+     } else {
+         return "netstat";
+@@ -195,27 +165,18 @@
+ /*!
+     \fn SMPPPDCSPlugin::smpppdServerChanged(const QString& server)
+  */
+-void SMPPPDCSPlugin::smpppdServerChanged(const QString& server) {
+-
+-	QString oldServer = SMPPPDCSConfig::self()->server().utf8();
+-
+-    if(oldServer != server) {
+-        kdDebug(14312) << k_funcinfo << "Detected a server change" << endl;
+-        m_detectorSMPPPD->smpppdServerChange();
+-    }
++void SMPPPDCSPlugin::smpppdServerChanged(const QString& server)
++{
++	static KConfig *config = KGlobal::config();
++	config->setGroup(SMPPPDCS_CONFIG_GROUP);
++	QString oldServer = config->readEntry("server", "localhost").utf8();
++	
++	if(oldServer != server) {
++		kdDebug(14312) << k_funcinfo << "Detected a server change" << endl;
++		m_detectorSMPPPD->smpppdServerChange();
++	}
+ }
+ 
+-void SMPPPDCSPlugin::aboutToUnload() {
+-
+-    kdDebug(14312) << k_funcinfo << endl;
+-
+-    if(m_timer) {
+-        m_timer->stop();
+-    }
+-
+-    emit readyForUnload();
+-}
+-
+ #include "smpppdcsplugin.moc"
+ 
+ // vim: set noet ts=4 sts=4 sw=4:
+--- kopete/plugins/smpppdcs/detectornetstat.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/detectornetstat.cpp	(revision 504660)
+@@ -27,7 +27,7 @@
+     delete m_process;
+ }
+ 
+-void DetectorNetstat::checkStatus() const {
++void DetectorNetstat::checkStatus() {
+     kdDebug(14312) << k_funcinfo << endl;
+ 
+     if(m_process) {
+--- kopete/plugins/smpppdcs/smpppdcsplugin.h	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsplugin.h	(revision 504660)
+@@ -62,15 +62,7 @@
+      */
+     virtual ~SMPPPDCSPlugin();
+ 
+-    // Implementation of DCOP iface
+     /**
+-     * @brief Checks if we are online.
+-     * @note This method is reserved for future use. Do not use at the moment!
+-     * @return <code>TRUE</code> if online, otherwise <code>FALSE</code>
+-     */
+-    virtual bool isOnline() const;
+-
+-    /**
+      * @brief Sets the status in all allowed accounts.
+      * Allowed accounts are set in the config dialog of the plugin.
+      *
+@@ -78,27 +70,39 @@
+      */
+     virtual void setConnectedStatus( bool newStatus );
+ 
++    // Implementation of DCOP iface
++
++    /**
++     * @brief Checks if we are online.
++     * @note This method is reserved for future use. Do not use at the moment!
++     * @return <code>TRUE</code> if online, otherwise <code>FALSE</code>
++     */
++    virtual bool isOnline();
++
+     virtual QString detectionMethod() const;
+ 
+-    virtual void aboutToUnload();
++protected:
++    /**
++     * @brief Should the smpppd be used for inquiring
++     * @return <code>TRUE</code> for smpppd, <code>FALSE</code> for netstat
++     */
++    bool useSmpppd() const;
+ 
+ public slots:
+-    void smpppdServerChanged(const QString& server);
++	void smpppdServerChanged(const QString& server);
+ 
+ private slots:
+     void slotCheckStatus();
+     void allPluginsLoaded();
+ 
+ private:
+-    
+-	void connectAllowed();
++    void connectAllowed();
+     void disconnectAllowed();
+ 
+ private:
+ 
+     Detector      * m_detectorSMPPPD;
+     Detector      * m_detectorNetstat;
+-    Detector      * m_detectorNetworkStatus;
+     bool            m_pluginConnected;
+     QTimer        * m_timer;
+     OnlineInquiry * m_onlineInquiry;
+--- kopete/plugins/smpppdcs/detector.h	(revision 502708)
++++ kopete/plugins/smpppdcs/detector.h	(revision 504660)
+@@ -17,6 +17,10 @@
+ #ifndef DETECTOR_H
+ #define DETECTOR_H
+ 
++#include <qmutex.h>
++
++#define SMPPPDCS_CONFIG_GROUP "SMPPPDCS Plugin"
++
+ class IConnector;
+ 
+ /**
+@@ -48,7 +52,7 @@
+      */
+ 	virtual ~Detector() {}
+ 
+-    virtual void checkStatus() const = 0;
++    virtual void checkStatus() = 0;
+ 	
+ 	virtual void smpppdServerChange() {}
+ 
+--- kopete/plugins/smpppdcs/detectordcop.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/detectordcop.cpp	(revision 504660)
+@@ -18,26 +18,24 @@
+ #include <dcopclient.h>
+ #include <kdebug.h>
+ 
+-#include "kinternetiface_stub.h"
+-
+ #include "detectordcop.h"
+ #include "iconnector.h"
+ 
+ QCString DetectorDCOP::m_kinternetApp = "";
+ 
+ DetectorDCOP::DetectorDCOP(IConnector * connector)
+-	: Detector(connector) {}
++        : Detector(connector) {}
+ 
+ DetectorDCOP::~DetectorDCOP() {}
+ 
+ /*!
+     \fn DetectorDCOP::getKInternetDCOP()
+  */
+-QCString DetectorDCOP::getKInternetDCOP() const {
+-    DCOPClient * client = kapp->dcopClient();
+-    if(m_kinternetApp.isEmpty() && client && client->isAttached()) {
++QCString DetectorDCOP::getKInternetDCOP() {
++    m_client = kapp->dcopClient();
++    if(m_kinternetApp.isEmpty() && m_client && m_client->isAttached()) {
+         // get all registered dcop apps and search for kinternet
+-        QCStringList apps = client->registeredApplications();
++        QCStringList apps = m_client->registeredApplications();
+         QCStringList::iterator iter;
+         for(iter = apps.begin(); iter != apps.end(); ++iter) {
+             if((*iter).left(9) == "kinternet") {
+@@ -52,26 +50,27 @@
+ /*!
+     \fn DetectorDCOP::getConnectionStatusDCOP()
+  */
+-DetectorDCOP::KInternetDCOPState DetectorDCOP::getConnectionStatusDCOP() const {
++DetectorDCOP::KInternetDCOPState DetectorDCOP::getConnectionStatusDCOP() {
++    QByteArray data, replyData;
++    QCString replyType;
++    QDataStream arg(data, IO_WriteOnly);
++
+     kdDebug(14312) << k_funcinfo << "Start inquiring " << m_kinternetApp << " via DCOP" << endl;
+-	
+-	
+-	KInternetIface_stub stub = KInternetIface_stub(kapp->dcopClient(), m_kinternetApp, "KInternetIface");
+-	
+-	bool status = stub.isOnline();
+-	
+-	if(stub.ok()) {
+-		if(status) {
+-			kdDebug(14312) << k_funcinfo << "isOnline() returned true" << endl;
+-			return CONNECTED;
+-		} else {
+-			kdDebug(14312) << k_funcinfo << "isOnline() returned false" << endl;
+-			return DISCONNECTED;
+-		}
+-	} else {
+-		kdWarning(14312) << k_funcinfo << "DCOP call to " << m_kinternetApp << " failed!";
+-	}
+ 
+-	return ERROR;
++    if(!m_client->call(m_kinternetApp, "KInternetIface", "isOnline()", data, replyType, replyData)) {
++        kdDebug(14312) << k_funcinfo << "there was some error using DCOP." << endl;
++    } else {
++        QDataStream reply(replyData, IO_ReadOnly);
++        if(replyType == "bool") {
++            bool result;
++            reply >> result;
++            kdDebug(14312) << k_funcinfo << "isOnline() returned " << result << endl;
++            return result ? CONNECTED : DISCONNECTED;
++        } else {
++            kdDebug(14312) << k_funcinfo << "isOnline() returned an unexpected type of reply!" << endl;
++        }
++    }
++
++    return ERROR;
+ }
+ 
+--- kopete/plugins/smpppdcs/detectornetstat.h	(revision 502708)
++++ kopete/plugins/smpppdcs/detectornetstat.h	(revision 504660)
+@@ -37,7 +37,7 @@
+     DetectorNetstat(IConnector* connector);
+     virtual ~DetectorNetstat();
+ 
+-    virtual void checkStatus() const;
++    virtual void checkStatus();
+ 
+ private slots:
+     // Original cs-plugin code
+@@ -49,7 +49,7 @@
+     void slotProcessExited(KProcess *process);
+ 
+ private:
+-    mutable KProcess * m_process;
++    KProcess * m_process;
+ };
+ 
+ #endif
+--- kopete/plugins/smpppdcs/detectordcop.h	(revision 502708)
++++ kopete/plugins/smpppdcs/detectordcop.h	(revision 504660)
+@@ -19,6 +19,7 @@
+ 
+ #include "detector.h"
+ 
++class DCOPClient;
+ class IConnector;
+ 
+ /**
+@@ -41,11 +42,12 @@
+         ERROR
+     };
+ 
+-    QCString getKInternetDCOP() const;
+-    KInternetDCOPState getConnectionStatusDCOP() const;
++    QCString getKInternetDCOP();
++    KInternetDCOPState getConnectionStatusDCOP();
+ 
+ protected:
+-    static QCString m_kinternetApp;
++    static QCString  m_kinternetApp;
++    DCOPClient     * m_client;
+ };
+ 
+ #endif
+--- kopete/plugins/smpppdcs/config/smpppdcspreferences.h	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdcspreferences.h	(revision 504660)
+@@ -0,0 +1,74 @@
++/*
++    smpppdcspreferences.h
++ 
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++ 
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#ifndef SMPPPDCSPREFERENCES_H
++#define SMPPPDCSPREFERENCES_H
++
++#include <kcautoconfigmodule.h>
++
++class QListViewItem;
++
++class SMPPPDCSPrefs;
++
++class AccountPrivMap {
++public:
++	AccountPrivMap(bool isOn = FALSE, const QString& id = QString::null)
++	 : m_on(isOn), m_id(id) {}
++	bool m_on;
++	QString m_id;
++};
++
++/**
++ * @brief Module for the configuration of the smpppdcs-plugin
++ *
++ * @author Heiko Sch&auml;fer <heiko at rangun.de>
++ */
++class SMPPPDCSPreferences : public KCAutoConfigModule {
++    Q_OBJECT
++
++    SMPPPDCSPreferences(const SMPPPDCSPreferences&);
++    SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&);
++
++public:
++	typedef QMap<QString, AccountPrivMap> AccountMap;
++
++    /**
++     * @brief Creates an <code>SMPPPDCSPreferences</code> instance
++     */
++    SMPPPDCSPreferences(QWidget * parent = 0, const char * name = 0, const QStringList &args = QStringList());
++	
++	/**
++     * @brief Destroys an <code>SMPPPDCSPreferences</code> instance
++     */
++    virtual ~SMPPPDCSPreferences();
++
++	virtual void load();
++	virtual void save();
++	virtual void defaults();
++	
++protected slots:
++	void listClicked(QListViewItem * item);
++
++protected:
++
++	/// The UI class generated by the QT-designer
++        SMPPPDCSPrefs * m_ui;
++	
++	AccountMap m_accountMapOld;
++	AccountMap m_accountMapCur;
++};
++
++#endif
+--- kopete/plugins/smpppdcs/config/smpppdcsprefsimpl.h	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdcsprefsimpl.h	(revision 504660)
+@@ -0,0 +1,76 @@
++/*
++    smpppdcsprefsimpl.h
++ 
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++ 
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#ifndef SMPPPDCSPREFSIMPL_H
++#define SMPPPDCSPREFSIMPL_H
++
++#include <qgroupbox.h>
++
++#include <kprogress.h>
++
++#include "smpppdcsprefs.h"
++
++class SMPPPDCSPlugin;
++class SMPPPDSearcher;
++
++/**
++ at author Heiko Sch&auml;fer <heiko at rangun.de>
++*/
++class SMPPPDCSPrefs : public SMPPPDCSPrefsBase 
++{
++	Q_OBJECT
++
++	SMPPPDCSPrefs(const SMPPPDCSPrefs&);
++	SMPPPDCSPrefs& operator=(const SMPPPDCSPrefs&);
++	
++public:
++
++    SMPPPDCSPrefs(QWidget* parent, const char* name = 0, WFlags fl = 0);
++    ~SMPPPDCSPrefs();
++
++signals:
++	void foundSMPPPD(bool found);
++	
++protected slots:
++    void enableSMPPPDSettings();
++    void disableSMPPPDSettings();
++    void determineCSType();
++    void smpppdFound(const QString & host);
++    void smpppdNotFound();
++	void scanStarted(uint total);
++	void scanProgress(uint cur);
++	void scanFinished();
++	void cancelScanning();
++
++private:
++	SMPPPDCSPlugin  * m_plugin;
++	KProgressDialog * m_scanProgressDlg;
++	SMPPPDSearcher  * m_curSearcher;
++};
++
++inline void SMPPPDCSPrefs::enableSMPPPDSettings() {
++	smpppdPrefs->setEnabled(true);
++}
++
++inline void SMPPPDCSPrefs::disableSMPPPDSettings() {
++	smpppdPrefs->setEnabled(false);
++}
++
++inline void SMPPPDCSPrefs::scanFinished() {
++	m_scanProgressDlg->hide();
++}
++
++#endif
+--- kopete/plugins/smpppdcs/config/smpppdlocationwidget.cpp	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdlocationwidget.cpp	(revision 504660)
+@@ -0,0 +1,30 @@
++/*
++    smpppdlocationwidget.cpp
++
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#include <klineedit.h>
++
++#include "smpppdlocationwidget.h"
++
++SMPPPDLocationWidget::SMPPPDLocationWidget(QWidget* parent, const char* name, WFlags fl)
++ : SMPPPDLocationWidgetBase(parent, name, fl) {}
++
++SMPPPDLocationWidget::~SMPPPDLocationWidget() {}
++
++void SMPPPDLocationWidget::setServer(const QString& serv) {
++    server->setText(serv);
++}
++
++#include "smpppdlocationwidget.moc"
+--- kopete/plugins/smpppdcs/config/smpppdsearcher.cpp	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdsearcher.cpp	(revision 504660)
+@@ -0,0 +1,197 @@
++/*
++    smpppdsearcher.h
++ 
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++ 
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#include <qregexp.h>
++#include <qfile.h>
++
++#include <kstreamsocket.h>
++#include <kprocess.h>
++#include <kdebug.h>
++
++#include "smpppdsearcher.h"
++
++SMPPPDSearcher::SMPPPDSearcher()
++        : m_cancelSearchNow(FALSE),
++        m_procIfconfig(NULL),
++m_procNetstat(NULL) {}
++
++SMPPPDSearcher::~SMPPPDSearcher() {
++    delete m_procIfconfig;
++    delete m_procNetstat;
++}
++
++/*!
++    \fn SMPPPDSearcher::searchNetwork() const
++ */
++void SMPPPDSearcher::searchNetwork() {
++    kdDebug(14312) << k_funcinfo << endl;
++
++    // the first point to search is localhost
++    if(!scan("127.0.0.1", "255.0.0.0")) {
++
++        m_procNetstat  = new KProcess;
++        m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output
++
++        *m_procNetstat << "/bin/netstat" << "-rn";
++        connect(m_procNetstat, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int)));
++        if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) {
++            kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl;
++
++            emit smpppdNotFound();
++        }
++
++        delete m_procNetstat;
++        m_procNetstat = NULL;
++    }
++}
++
++/*!
++    \fn SMPPPDSearcher::slotStdoutReceived(KProcess * proc, char * buf, int len)
++ */
++void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) {
++    kdDebug(14312) << k_funcinfo << endl;
++
++    QString myBuf = QString::fromLatin1(buf,len);
++    QRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})");
++    // tokenize the string into lines
++    QStringList toks = QStringList::split("\n", myBuf);
++    for(QStringList::size_type i = 0; i < toks.count(); i++) {
++        if(rex.exactMatch(toks[i])) {
++            if(scan(rex.cap(1), rex.cap(2))) {
++                return;
++            }
++        }
++    }
++
++    emit smpppdNotFound();
++}
++void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) {
++    kdDebug(14312) << k_funcinfo << endl;
++
++    QRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*");
++    QString myBuf = QString::fromLatin1(buf,len);
++
++    if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) {
++        // if netstat -r found no gateway we search the network
++        m_procIfconfig = new KProcess;
++        m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output
++
++        *m_procIfconfig << "/sbin/ifconfig";
++        connect(m_procIfconfig, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int)));
++        if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) {
++            kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl;
++
++            emit smpppdNotFound();
++        }
++
++        delete m_procIfconfig;
++        m_procIfconfig = NULL;
++    }
++}
++
++/*!
++    \fn SMPPPDSearcher::scan() const
++ */
++bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) {
++    kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl;
++	
++	if(ip == "127.0.0.1") { // if localhost, we only scan this one host
++		if(scanIP(ip)) {
++			return true;
++		}
++		
++		return false;
++	}
++
++    uint min_range = 0;
++    uint max_range = 255;
++
++    // calculate ip range (only last mask entry)
++    QRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})");
++    if(lastRex.exactMatch(ip)) {
++
++        uint lastWordIP = lastRex.cap(4).toUInt();
++
++        QStringList ipToks;
++        for(int i = 1; i < 5; i++) {
++            ipToks.push_back(lastRex.cap(i));
++        }
++
++        if(lastRex.exactMatch(mask)) {
++            uint lastWordMask = lastRex.cap(4).toUInt();
++
++            if(lastWordMask == 0) {
++                kdDebug(14312) << k_funcinfo << "IP-Range: " << ipToks[0] << "." << ipToks[1] << "." <<  ipToks[2] << ".0 - " << ipToks[0] << "." << ipToks[1] << "." << ipToks[2] << ".255" << endl;
++                max_range = 255;
++            } else if(lastWordMask == 255) {
++                min_range = max_range = lastWordIP;
++            } else {
++                kdDebug(14312) << k_funcinfo << "IP-Range: " << ipToks[0] << "." << ipToks[1] << "." <<  ipToks[2] << ".0 - " << ipToks[0] << "." << ipToks[1] << "." << ipToks[2] << "." << lastWordMask << endl;
++                max_range = lastWordMask;
++            }
++        }
++
++        uint range = max_range - min_range;
++        m_cancelSearchNow = FALSE;
++        if(range > 1) {
++            emit scanStarted(max_range);
++        }
++        for(uint i = min_range; i <= max_range; i++) {
++            if(m_cancelSearchNow) {
++                if(range > 1) {
++                    emit scanFinished();
++                }
++                break;
++            }
++            if(range > 1) {
++                emit scanProgress(i);
++            }
++            if(scanIP(QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)))) {
++                if(range > 1) {
++                    emit scanFinished();
++                }
++                return true;
++            }
++        }
++        if(range > 1) {
++            emit scanFinished();
++        }
++    }
++
++    return false;
++}
++
++/*!
++    \fn SMPPPDSearcher::scanIP(const QString& ip)
++ */
++bool SMPPPDSearcher::scanIP(const QString& ip) {
++    kdDebug(14312) << k_funcinfo << "Now scanning " << ip << "..." << endl;
++
++    KNetwork::KStreamSocket sock(ip, "3185");
++    sock.setBlocking(TRUE);
++    sock.setTimeout(500);
++
++    if(sock.connect()) {
++        emit smpppdFound(ip);
++        return true;
++    } else {
++        kdDebug(14312) << k_funcinfo << "Socket Error: " << KNetwork::KStreamSocket::errorString(sock.error()) << endl;
++    }
++
++    return false;
++}
++
++#include "smpppdsearcher.moc"
+--- kopete/plugins/smpppdcs/config/smpppdcsprefs.ui	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdcsprefs.ui	(revision 504660)
+@@ -0,0 +1,284 @@
++<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
++<class>SMPPPDCSPrefsBase</class>
++<author>Heiko Schaefer</author>
++<widget class="QWidget">
++    <property name="name">
++        <cstring>SMPPPDCSPrefsBase</cstring>
++    </property>
++    <property name="geometry">
++        <rect>
++            <x>0</x>
++            <y>0</y>
++            <width>476</width>
++            <height>225</height>
++        </rect>
++    </property>
++    <property name="caption">
++        <string>SMPPPDCS Preferences</string>
++    </property>
++    <vbox>
++        <property name="name">
++            <cstring>unnamed</cstring>
++        </property>
++        <widget class="QTabWidget">
++            <property name="name">
++                <cstring>tabWidget</cstring>
++            </property>
++            <widget class="QWidget">
++                <property name="name">
++                    <cstring>tab</cstring>
++                </property>
++                <attribute name="title">
++                    <string>&amp;Connection</string>
++                </attribute>
++                <vbox>
++                    <property name="name">
++                        <cstring>unnamed</cstring>
++                    </property>
++                    <widget class="QLayoutWidget">
++                        <property name="name">
++                            <cstring>layout4</cstring>
++                        </property>
++                        <vbox>
++                            <property name="name">
++                                <cstring>unnamed</cstring>
++                            </property>
++                            <property name="margin">
++                                <number>6</number>
++                            </property>
++                            <property name="spacing">
++                                <number>6</number>
++                            </property>
++                            <widget class="QButtonGroup">
++                                <property name="name">
++                                    <cstring>csMethod</cstring>
++                                </property>
++                                <property name="title">
++                                    <string>Method of Connection Status Detection</string>
++                                </property>
++                                <vbox>
++                                    <property name="name">
++                                        <cstring>unnamed</cstring>
++                                    </property>
++                                    <property name="margin">
++                                        <number>6</number>
++                                    </property>
++                                    <property name="spacing">
++                                        <number>6</number>
++                                    </property>
++                                    <widget class="QRadioButton">
++                                        <property name="name">
++                                            <cstring>useNetstat</cstring>
++                                        </property>
++                                        <property name="text">
++                                            <string>&amp;netstat - Standard method of connection status detection</string>
++                                        </property>
++                                        <property name="checked">
++                                            <bool>true</bool>
++                                        </property>
++                                        <property name="toolTip" stdset="0">
++                                            <string>Uses the netstat command to find a gateway; suitable on dial-up computers</string>
++                                        </property>
++                                    </widget>
++                                    <widget class="QRadioButton">
++                                        <property name="name">
++                                            <cstring>useSmpppd</cstring>
++                                        </property>
++                                        <property name="text">
++                                            <string>smpppd - Ad&amp;vanced method of connection status detection</string>
++                                        </property>
++                                        <property name="toolTip" stdset="0">
++                                            <string>Uses the smpppd on a gateway; suitable for a computer in a private network</string>
++                                        </property>
++                                    </widget>
++                                    <widget class="QLayoutWidget">
++                                        <property name="name">
++                                            <cstring>autoCSLayout</cstring>
++                                        </property>
++                                        <hbox>
++                                            <property name="name">
++                                                <cstring>unnamed</cstring>
++                                            </property>
++                                            <widget class="KPushButton">
++                                                <property name="name">
++                                                    <cstring>autoCSTest</cstring>
++                                                </property>
++                                                <property name="text">
++                                                    <string>&amp;Try to Detect Automatically</string>
++                                                </property>
++                                                <property name="toolTip" stdset="0">
++                                                    <string>Tries to find an appropriate connection method</string>
++                                                </property>
++                                            </widget>
++                                            <spacer>
++                                                <property name="name">
++                                                    <cstring>spacer4</cstring>
++                                                </property>
++                                                <property name="orientation">
++                                                    <enum>Horizontal</enum>
++                                                </property>
++                                                <property name="sizeType">
++                                                    <enum>Expanding</enum>
++                                                </property>
++                                                <property name="sizeHint">
++                                                    <size>
++                                                        <width>341</width>
++                                                        <height>20</height>
++                                                    </size>
++                                                </property>
++                                            </spacer>
++                                        </hbox>
++                                    </widget>
++                                </vbox>
++                            </widget>
++                            <widget class="QGroupBox">
++                                <property name="name">
++                                    <cstring>smpppdPrefs</cstring>
++                                </property>
++                                <property name="enabled">
++                                    <bool>false</bool>
++                                </property>
++                                <property name="title">
++                                    <string>Location of the SMPPPD</string>
++                                </property>
++                                <vbox>
++                                    <property name="name">
++                                        <cstring>unnamed</cstring>
++                                    </property>
++                                    <property name="margin">
++                                        <number>6</number>
++                                    </property>
++                                    <property name="spacing">
++                                        <number>6</number>
++                                    </property>
++                                    <widget class="SMPPPDLocationWidget">
++                                        <property name="name">
++                                            <cstring>SMPPPDLocation</cstring>
++                                        </property>
++                                    </widget>
++                                </vbox>
++                            </widget>
++                            <spacer>
++                                <property name="name">
++                                    <cstring>spacer18</cstring>
++                                </property>
++                                <property name="orientation">
++                                    <enum>Vertical</enum>
++                                </property>
++                                <property name="sizeType">
++                                    <enum>Expanding</enum>
++                                </property>
++                                <property name="sizeHint">
++                                    <size>
++                                        <width>20</width>
++                                        <height>20</height>
++                                    </size>
++                                </property>
++                            </spacer>
++                        </vbox>
++                    </widget>
++                </vbox>
++            </widget>
++            <widget class="QWidget">
++                <property name="name">
++                    <cstring>tab</cstring>
++                </property>
++                <attribute name="title">
++                    <string>Acco&amp;unts</string>
++                </attribute>
++                <vbox>
++                    <property name="name">
++                        <cstring>unnamed</cstring>
++                    </property>
++                    <property name="spacing">
++                        <number>6</number>
++                    </property>
++                    <spacer>
++                        <property name="name">
++                            <cstring>spacer4_2</cstring>
++                        </property>
++                        <property name="orientation">
++                            <enum>Vertical</enum>
++                        </property>
++                        <property name="sizeType">
++                            <enum>Fixed</enum>
++                        </property>
++                        <property name="sizeHint">
++                            <size>
++                                <width>20</width>
++                                <height>6</height>
++                            </size>
++                        </property>
++                    </spacer>
++                    <widget class="QLabel">
++                        <property name="name">
++                            <cstring>toIgnoreLabel</cstring>
++                        </property>
++                        <property name="text">
++                            <string>Choose the accounts to ignore:</string>
++                        </property>
++                    </widget>
++                    <widget class="KListView">
++                        <column>
++                            <property name="text">
++                                <string>Account</string>
++                            </property>
++                            <property name="clickable">
++                                <bool>true</bool>
++                            </property>
++                            <property name="resizable">
++                                <bool>false</bool>
++                            </property>
++                        </column>
++                        <property name="name">
++                            <cstring>accountList</cstring>
++                        </property>
++                        <property name="allColumnsShowFocus">
++                            <bool>true</bool>
++                        </property>
++                        <property name="resizeMode">
++                            <enum>LastColumn</enum>
++                        </property>
++                    </widget>
++                </vbox>
++            </widget>
++        </widget>
++    </vbox>
++</widget>
++<customwidgets>
++    <customwidget>
++        <class>SMPPPDLocationWidget</class>
++	<header location="local">smpppdlocationwidget.h</header>
++        <sizehint>
++            <width>16</width>
++            <height>16</height>
++        </sizehint>
++        <container>1</container>
++        <sizepolicy>
++            <hordata>5</hordata>
++            <verdata>5</verdata>
++            <horstretch>0</horstretch>
++            <verstretch>0</verstretch>
++        </sizepolicy>
++        <pixmap>image0</pixmap>
++    </customwidget>
++</customwidgets>
++<images>
++    <image name="image0">
++        <data format="PNG" length="1125">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042c49444154388db5954f6c14551cc73fefcd7476b65bdaae4bb78bb5502a14d404e4801c88182d1c4c2c693da847400f9c24c68b878684238660e2b1e01f12c19493012ef2478c814412d354a46017a8a564bb6da5bbedccee767776e63d0ffb073751d483bfe49799974c3eeffb7ebf37df9fd05a530b2184040cc0042420aaf9a4d0d554800f045a6b256ae0e1e1e1d6bebebe838ee31c48a7d39b5cd7fd075e251cc7617272f2ded8d8d819cff33e0316819259537aead4a9839d5dd6d1784f91f55b0a94830242088404d304292bef68a89f520802a598fecddaa04f1a876f5c250c7c0a64cdeac686e33807e23d45e6b297c8b877f1831542614550b6599835c83c2a81b6786a75134faf2f1169f12997350881d9021d0903e06de0745d3160a6d3e94dbd5b0a64dcbb94b5831d0e3375ab892b1772dcf9790528543f8dd0d367b36768153b5e31503a0f1aecb004580b44ffac58baae8b1714f0833c7638cc8dab303a320f4822ab4c7a37c69196203de3319d5ce1c4d13c733331dedc67a129a154fd128401ab0616d55a130ac3d42d93d1913940d13fd0c9ee0183685c60da01c5421bd72f7a8c8efccef9afd374267ad93d642365be0636a0d28ec7600941d9e6f23917f0e97f23ce5bef35d19ec863da0ed9059b2be70bec196c66dfa10ec0e49b338f7017258651bf95021035c595429bb0903248fe52a2b5b595dd7b4d945cc2340cdca536be389ee3f67886c5798f773fe8e0dac508c989659277a2180da4ca4ff07821058b8b251445d63d6b13ed1098a6417e39cac85197dbe31962ab9bd9f1f22a226d45366f6d0620fdb08c900d281af6110284b20085b414861d905d88f2e52739ee8cbb8022143259d3dd84691730aa2d52da441a8de0c6958068870022a41e9629ad3473fd3b8fdbe319dadb9b4924da994d2d716c7896fbe35152f78b48245d6b2da4507faf582be8eaf159b721cc837b05ae7debb1f79d08cb8b515edad942a22bc4b1c33eb3d34b1c797f06af90a72d16e2f96d9a74aa11dca8586b222d01af0fb60070f6c402d72f15d97f28c6f6d7027a5f5ce6c3233dc4e2ede496b278be4fff608cee8d3e1add806aeca51094cbb06397c1ecc328e746537c7e3ccdb5cb1136bf60635882d4d41c6ec6836ab37efa214f72208ed9f4d7cdd38ee310280542e38b1c43fb6de26b3672e1ec3cc99bcb246f66a938a3241ab3e91f7c861fbf77710b1e5e49915bae974203ba0e9e9c9cbc373d6d6d305a040a89c2a77f50b27d5782bbbf7acccf28349235dd16cf6dd374f7295e1de8a45c02d37499182b01cc0201a085d61a2144d8b2ac8fb6ed340e77240c4261890e04c250185262546d534a032154b59e0ad394e41c98182bf268ce6721ed9f064e0253356f6da2e24c1f030f783c15fe6da680af8021602bd051532ca9b8521488559f61aa86c29343578fbf0264a94c906c7d3409214c20043457a116ff6de6795578012889ff6b98fe016ea0ce1c6a2573410000000049454e44ae426082</data>
++    </image>
++</images>
++<tabstops>
++    <tabstop>tabWidget</tabstop>
++    <tabstop>useNetstat</tabstop>
++    <tabstop>autoCSTest</tabstop>
++    <tabstop>useSmpppd</tabstop>
++    <tabstop>accountList</tabstop>
++</tabstops>
++<layoutdefaults spacing="0" margin="0"/>
++<includehints>
++    <includehint>kpushbutton.h</includehint>
++    <includehint>smpppdlocationwidget.h</includehint>
++    <includehint>klistview.h</includehint>
++</includehints>
++</UI>
+--- kopete/plugins/smpppdcs/config/smpppdlocationui.ui	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdlocationui.ui	(revision 504660)
+@@ -0,0 +1,149 @@
++<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
++<class>SMPPPDLocationWidgetBase</class>
++<widget class="QWidget">
++    <property name="name">
++        <cstring>SMPPPDLocationWidgetBase</cstring>
++    </property>
++    <property name="geometry">
++        <rect>
++            <x>0</x>
++            <y>0</y>
++            <width>365</width>
++            <height>167</height>
++        </rect>
++    </property>
++    <property name="caption">
++        <string>SMPPPDLocation</string>
++    </property>
++    <vbox>
++        <property name="name">
++            <cstring>unnamed</cstring>
++        </property>
++        <widget class="QLabel">
++            <property name="name">
++                <cstring>textLabel1</cstring>
++            </property>
++            <property name="text">
++                <string>Ser&amp;ver:</string>
++            </property>
++            <property name="buddy" stdset="0">
++                <cstring>server</cstring>
++            </property>
++        </widget>
++        <widget class="KLineEdit">
++            <property name="name">
++                <cstring>server</cstring>
++            </property>
++            <property name="cursor">
++                <cursor>4</cursor>
++            </property>
++            <property name="text">
++                <string>localhost</string>
++            </property>
++            <property name="maxLength">
++                <number>256</number>
++            </property>
++            <property name="toolTip" stdset="0">
++                <string>The server on which the SMPPPD is running</string>
++            </property>
++        </widget>
++        <widget class="QLabel">
++            <property name="name">
++                <cstring>textLabel2</cstring>
++            </property>
++            <property name="text">
++                <string>P&amp;ort:</string>
++            </property>
++            <property name="buddy" stdset="0">
++                <cstring>port</cstring>
++            </property>
++        </widget>
++        <widget class="QLayoutWidget">
++            <property name="name">
++                <cstring>layout14</cstring>
++            </property>
++            <hbox>
++                <property name="name">
++                    <cstring>unnamed</cstring>
++                </property>
++                <widget class="KIntNumInput">
++                    <property name="name">
++                        <cstring>port</cstring>
++                    </property>
++                    <property name="cursor">
++                        <cursor>4</cursor>
++                    </property>
++                    <property name="value">
++                        <number>3185</number>
++                    </property>
++                    <property name="minValue">
++                        <number>0</number>
++                    </property>
++                    <property name="toolTip" stdset="0">
++                        <string>The port on which the SMPPPD is running on</string>
++                    </property>
++                </widget>
++                <widget class="QLabel">
++                    <property name="name">
++                        <cstring>textLabel3</cstring>
++                    </property>
++                    <property name="text">
++                        <string>Default: 3185</string>
++                    </property>
++                </widget>
++                <spacer>
++                    <property name="name">
++                        <cstring>spacer15</cstring>
++                    </property>
++                    <property name="orientation">
++                        <enum>Horizontal</enum>
++                    </property>
++                    <property name="sizeType">
++                        <enum>Expanding</enum>
++                    </property>
++                    <property name="sizeHint">
++                        <size>
++                            <width>130</width>
++                            <height>20</height>
++                        </size>
++                    </property>
++                </spacer>
++            </hbox>
++        </widget>
++        <widget class="QLabel">
++            <property name="name">
++                <cstring>m_passwordLabel</cstring>
++            </property>
++            <property name="text">
++                <string>Pass&amp;word:</string>
++            </property>
++            <property name="buddy" stdset="0">
++                <cstring>Password</cstring>
++            </property>
++        </widget>
++        <widget class="KLineEdit">
++            <property name="name">
++                <cstring>Password</cstring>
++            </property>
++            <property name="cursor">
++                <cursor>4</cursor>
++            </property>
++            <property name="echoMode">
++                <enum>Password</enum>
++            </property>
++            <property name="toolTip" stdset="0">
++                <string>The password to authenticate with the smpppd</string>
++            </property>
++        </widget>
++    </vbox>
++</widget>
++<customwidgets>
++</customwidgets>
++<layoutdefaults spacing="6" margin="0"/>
++<includehints>
++    <includehint>klineedit.h</includehint>
++    <includehint>knuminput.h</includehint>
++    <includehint>knuminput.h</includehint>
++    <includehint>klineedit.h</includehint>
++</includehints>
++</UI>
+--- kopete/plugins/smpppdcs/config/smpppdlocationwidget.h	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdlocationwidget.h	(revision 504660)
+@@ -0,0 +1,39 @@
++/*
++    smpppdlocationwidget.h
++
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#ifndef SMPPPDLOCATIONWIDGET_H
++#define SMPPPDLOCATIONWIDGET_H
++
++#include "smpppdlocationui.h"
++
++/**
++	@author Heiko Sch&auml;fer <heiko at rangun.de>
++*/
++class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase
++{
++	Q_OBJECT
++
++	SMPPPDLocationWidget(const SMPPPDLocationWidget&);
++	SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&);
++
++public:
++    SMPPPDLocationWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
++    ~SMPPPDLocationWidget();
++
++    void setServer(const QString& serv);
++};
++
++#endif
+--- kopete/plugins/smpppdcs/config/smpppdsearcher.h	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdsearcher.h	(revision 504660)
+@@ -0,0 +1,110 @@
++/*
++    smpppdsearcher.h
++ 
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++ 
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++
++#ifndef SMPPPDSEARCHER_H
++#define SMPPPDSEARCHER_H
++
++#include <kresolver.h>
++
++class KProcess;
++
++/**
++ * @brief Searches a network for a smpppd
++ *
++ * @todo Use of the SLP to find the smpppd
++ * @author Heiko Sch&auml;fer <heiko at rangun.de>
++ */
++class SMPPPDSearcher : public QObject {
++    Q_OBJECT
++
++    SMPPPDSearcher(const SMPPPDSearcher&);
++    SMPPPDSearcher& operator=(const SMPPPDSearcher&);
++
++public:
++    /**
++     * @brief Creates an <code>SMPPPDSearcher</code> instance
++     */
++    SMPPPDSearcher();
++	
++    /**
++     * @brief Destroys an <code>SMPPPDSearcher</code> instance
++     */
++    ~SMPPPDSearcher();
++
++    /**
++     * @brief Triggers a network scan to find a smpppd
++	 * @see smpppdFound
++	 * @see smpppdNotFound
++     */
++    void searchNetwork();
++	
++	void cancelSearch();
++
++protected:
++    /**
++     * @brief Scans a network for a smpppd
++	 *
++	 * Scans a network for a smpppd described by
++	 * ip and mask.
++	 *
++     * @param ip   the ntwork ip
++     * @param mask the network mask
++     * @return <code>TRUE</code> if an smpppd was found
++     */
++    bool scan(const QString& ip, const QString& mask);
++	
++    /**
++     * @brief Checks the ip for an smpppd
++	 * 
++     * @param ip the ip to check
++     * @return <code>TRUE</code> if an smpppd was found at the ip
++     */
++    bool scanIP(const QString& ip);
++
++signals:
++    /**
++     * @brief A smppd was found
++	 * 
++     * @param host the host there the smpppd was found
++     */
++    void smpppdFound(const QString& host);
++	
++    /**
++     * @brief No smpppd was found 
++     */
++    void smpppdNotFound();
++	
++	void scanStarted(uint total);
++	void scanProgress(uint cur);
++	void scanFinished();
++
++protected slots:
++    void slotStdoutReceivedIfconfig(KProcess * proc, char * buf, int len);
++    void slotStdoutReceivedNetstat (KProcess * proc, char * buf, int len);
++
++private:
++	bool m_cancelSearchNow;
++    KProcess * m_procIfconfig;
++    KProcess * m_procNetstat;
++};
++
++inline void SMPPPDSearcher::cancelSearch() {
++	m_cancelSearchNow = TRUE;
++}
++
++#endif
++
+--- kopete/plugins/smpppdcs/config/Makefile.am	(revision 0)
++++ kopete/plugins/smpppdcs/config/Makefile.am	(revision 504660)
+@@ -0,0 +1,14 @@
++METASOURCES = AUTO
++
++AM_CPPFLAGS = $(KOPETE_INCLUDES) $(all_includes)
++
++kde_module_LTLIBRARIES = kcm_kopete_smpppdcs.la
++
++kcm_kopete_smpppdcs_la_SOURCES = smpppdcsprefs.ui smpppdcspreferences.cpp \
++	smpppdsearcher.cpp smpppdcsprefsimpl.cpp smpppdlocationui.ui smpppdlocationwidget.cpp
++kcm_kopete_smpppdcs_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries)
++kcm_kopete_smpppdcs_la_LIBADD  = ../../../libkopete/libkopete.la $(LIB_KUTILS)
++
++kcm_DATA = kopete_smpppdcs_config.desktop
++kcmdir = $(kde_servicesdir)/kconfiguredialog
++noinst_HEADERS = smpppdsearcher.h smpppdcsprefsimpl.h smpppdlocationwidget.h
+--- kopete/plugins/smpppdcs/config/smpppdcspreferences.cpp	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdcspreferences.cpp	(revision 504660)
+@@ -0,0 +1,151 @@
++/*
++    smpppdcspreferences.cpp
++
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#include <qmap.h>
++#include <qregexp.h>
++#include <qtabwidget.h>
++
++#include <kconfig.h>
++#include <klistview.h>
++#include <kautoconfig.h>
++#include <kiconloader.h>
++#include <kgenericfactory.h>
++
++#include "kopeteaccount.h"
++#include "kopeteprotocol.h"
++#include "kopeteaccountmanager.h"
++
++#include "smpppdcspreferences.h"
++#include "smpppdcsprefsimpl.h"
++
++#define CONFIGGROUP "SMPPPDCS Plugin"
++
++typedef KGenericFactory<SMPPPDCSPreferences> SMPPPDCSPreferencesFactory;
++K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs"))
++
++SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name */, const QStringList& args)
++ : KCAutoConfigModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) {
++
++ 	Kopete::AccountManager * manager = Kopete::AccountManager::self(); 
++	m_ui = new SMPPPDCSPrefs(this);
++
++	for(QPtrListIterator<Kopete::Account> it(manager->accounts()); it.current(); ++it)
++	{
++		QString protoName;
++		QRegExp rex("(.*)Protocol");
++		if(rex.search((*it)->protocol()->pluginId()) > -1) {
++			protoName = rex.cap(1);
++		} else {
++			protoName = (*it)->protocol()->pluginId();
++		}
++		
++		QCheckListItem * cli = new QCheckListItem(m_ui->accountList, 
++			(*it)->accountId() + " (" + protoName + ")", QCheckListItem::CheckBox);
++		cli->setPixmap(0, (*it)->accountIcon());
++		
++		m_accountMapOld[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId());
++		m_accountMapCur[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId());;
++		m_ui->accountList->insertItem(cli);
++	}
++	
++	autoConfig()->ignoreSubWidget(m_ui->tabWidget);
++	autoConfig()->addWidget(m_ui->tabWidget->page(0), CONFIGGROUP);
++	setMainWidget(m_ui, CONFIGGROUP);
++
++	connect(m_ui->accountList, SIGNAL(clicked(QListViewItem *)), this, SLOT(listClicked(QListViewItem *)));
++	
++	load();
++}
++
++SMPPPDCSPreferences::~SMPPPDCSPreferences() {
++	delete m_ui;
++}
++
++void SMPPPDCSPreferences::listClicked(QListViewItem * item)
++{
++	QCheckListItem * cli = dynamic_cast<QCheckListItem *>(item);
++	
++	if(cli->isOn() != m_accountMapCur[cli->text(0)].m_on) {
++		AccountMap::iterator itOld = m_accountMapOld.begin();
++		AccountMap::iterator itCur;
++		bool change = FALSE;
++		
++		for(itCur = m_accountMapCur.begin(); itCur != m_accountMapCur.end(); ++itCur, ++itOld) {
++			if((*itCur).m_on != (*itOld).m_on){
++				change = TRUE;
++				break;
++			}
++		}
++		emit changed(change);
++	}
++	m_accountMapCur[cli->text(0)].m_on = cli->isOn();
++}
++
++void SMPPPDCSPreferences::defaults()
++{
++	QListViewItemIterator it(m_ui->accountList);
++	while(it.current()) {
++		QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
++		cli->setOn(FALSE);
++		++it;
++	}
++	
++	KCAutoConfigModule::defaults();
++}
++
++void SMPPPDCSPreferences::load()
++{
++	KConfig * config = KGlobal::config();
++	config->setGroup(CONFIGGROUP);
++	
++	QRegExp rex("^(.*) \\((.*)\\)");
++	QStringList list = config->readListEntry("ignoredAccounts");
++	QListViewItemIterator it(m_ui->accountList);
++	while(it.current()) {
++		QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
++		if(rex.search(cli->text(0)) > -1) {
++			bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1));
++			// m_accountMapOld[cli->text(0)].m_on = isOn;
++			m_accountMapCur[cli->text(0)].m_on = isOn;
++			cli->setOn(isOn);
++		}
++		++it;
++	}
++	KCAutoConfigModule::load();
++}
++
++void SMPPPDCSPreferences::save()
++{
++	KCAutoConfigModule::save();
++	KConfig * config = KGlobal::config();
++	config->setGroup(CONFIGGROUP);
++	
++	QStringList list;
++	QListViewItemIterator it(m_ui->accountList);
++	while(it.current()) {
++	
++		QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
++		if(cli->isOn()) {
++			list.append(m_accountMapCur[cli->text(0)].m_id);
++		}
++		
++		++it;
++	}
++		
++	config->writeEntry("ignoredAccounts", list);
++}
++
++#include "smpppdcspreferences.moc"
+--- kopete/plugins/smpppdcs/config/smpppdcsprefsimpl.cpp	(revision 0)
++++ kopete/plugins/smpppdcs/config/smpppdcsprefsimpl.cpp	(revision 504660)
+@@ -0,0 +1,165 @@
++/*
++    smpppdcsprefsimpl.cpp
++ 
++    Copyright (c) 2004-2006 by Heiko Schaefer        <heiko at rangun.de>
++ 
++    Kopete    (c) 2002-2006 by the Kopete developers <kopete-devel at 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; version 2 of the License.               *
++    *                                                                       *
++    *************************************************************************
++*/
++
++#include <arpa/inet.h>
++#include <netdb.h>
++
++#include <qradiobutton.h>
++
++#include <kstandarddirs.h>
++#include <kapplication.h>
++#include <kpushbutton.h>
++#include <kresolver.h>
++#include <knuminput.h>
++#include <klocale.h>
++#include <kdebug.h>
++
++#include "kopetepluginmanager.h"
++
++#include "../smpppdcsplugin.h"
++
++#include "smpppdlocationwidget.h"
++#include "smpppdcsprefsimpl.h"
++#include "smpppdsearcher.h"
++
++SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl)
++	: SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) {
++
++	// search for our main-plugin instance
++	Kopete::Plugin * p = Kopete::PluginManager::self()->plugin("kopete_smpppdcs");
++	if(p) {
++		m_plugin = static_cast<SMPPPDCSPlugin *>(p);
++	}
++
++    // signals and slots connections
++    connect(useNetstat, SIGNAL(toggled(bool)), this, SLOT(disableSMPPPDSettings()));
++    connect(useSmpppd,  SIGNAL(toggled(bool)), this, SLOT(enableSMPPPDSettings()));
++    connect(autoCSTest, SIGNAL(clicked()),     this, SLOT(determineCSType()));
++	
++	if(m_plugin) {
++		connect((QObject *)SMPPPDLocation->server, SIGNAL(textChanged(const QString&)),
++				m_plugin, SLOT(smpppdServerChanged(const QString&)));
++	}
++
++    // if netstat is NOT available, disable the option and set to SMPPPD
++    if(KStandardDirs::findExe("netstat") == QString::null) {
++        autoCSTest->setEnabled(FALSE);
++        useNetstat->setEnabled(FALSE);
++        useNetstat->setChecked(FALSE);
++        useSmpppd->setChecked(TRUE);
++    }
++}
++
++SMPPPDCSPrefs::~SMPPPDCSPrefs() {
++    delete m_scanProgressDlg;
++}
++
++void SMPPPDCSPrefs::determineCSType() {
++
++    // while we search, we'll disable the button
++    autoCSTest->setEnabled(false);
++    //kapp->processEvents();
++
++    /* broadcast network for a smpppd.
++       If one is available set to smpppd method */
++
++    SMPPPDSearcher searcher;
++    m_curSearcher = &searcher;
++
++    connect(&searcher, SIGNAL(smpppdFound(const QString&)), this, SLOT(smpppdFound(const QString&)));
++    connect(&searcher, SIGNAL(smpppdNotFound()), this, SLOT(smpppdNotFound()));
++    connect(&searcher, SIGNAL(scanStarted(uint)), this, SLOT(scanStarted(uint)));
++    connect(&searcher, SIGNAL(scanProgress(uint)), this, SLOT(scanProgress(uint)));
++    connect(&searcher, SIGNAL(scanFinished()), this, SLOT(scanFinished()));
++
++    searcher.searchNetwork();
++    m_curSearcher = NULL;
++}
++
++void SMPPPDCSPrefs::scanStarted(uint total) {
++    kdDebug(14312) << k_funcinfo << "Scanning for a SMPPPD started. Will scan " << total << " IPs" << endl;
++
++    // setup the scanProgress Dialog
++    if(!m_scanProgressDlg) {
++        m_scanProgressDlg = new KProgressDialog(this, 0, i18n("Searching"), i18n("Searching for a SMPPPD on the local network..."), TRUE);
++        m_scanProgressDlg->setAutoClose(TRUE);
++        m_scanProgressDlg->setAllowCancel(TRUE);
++        m_scanProgressDlg->setMinimumDuration(2000);
++
++        connect(m_scanProgressDlg, SIGNAL(cancelClicked()), this, SLOT(cancelScanning()));
++    }
++    m_scanProgressDlg->progressBar()->setTotalSteps(total);
++    m_scanProgressDlg->progressBar()->setProgress(0);
++    m_scanProgressDlg->show();
++}
++
++void SMPPPDCSPrefs::scanProgress(uint cur) {
++    m_scanProgressDlg->progressBar()->setProgress(cur);
++    kapp->processEvents();
++}
++
++void SMPPPDCSPrefs::cancelScanning() {
++    kdDebug(14312) << k_funcinfo << endl;
++    Q_ASSERT(m_curSearcher);
++    m_curSearcher->cancelSearch();
++}
++
++void SMPPPDCSPrefs::smpppdFound(const QString& host) {
++    kdDebug(14312) << k_funcinfo << endl;
++
++    QString myHost = host;
++
++    // try to get the domain name
++    struct in_addr addr;
++    if(inet_aton(host.ascii(), &addr)) {
++        struct hostent * hostEnt = gethostbyaddr(&addr.s_addr, sizeof(addr.s_addr), AF_INET);
++        if(hostEnt) {
++            myHost = hostEnt->h_name;
++        } else {
++#ifndef NDEBUG
++            switch(h_errno) {
++            case HOST_NOT_FOUND:
++                kdDebug(14312) << k_funcinfo << "No such host is known in the database." << endl;
++                break;
++            case TRY_AGAIN:
++                kdDebug(14312) << k_funcinfo << "Couldn't contact DNS server." << endl;
++                break;
++            case NO_RECOVERY:
++                kdDebug(14312) << k_funcinfo << "A non-recoverable error occurred." << endl;
++                break;
++            case NO_ADDRESS:
++                kdDebug(14312) << k_funcinfo << "The host database contains an entry for the name, but it doesn't have an associated Internet address." << endl;
++                break;
++            }
++#endif
++
++        }
++    }
++
++    SMPPPDLocation->setServer(myHost);
++    useNetstat->setChecked(false);
++    useSmpppd->setChecked(true);
++    autoCSTest->setEnabled(true);
++}
++
++void SMPPPDCSPrefs::smpppdNotFound() {
++    kdDebug(14312) << k_funcinfo << endl;
++    useNetstat->setChecked(true);
++    useSmpppd->setChecked(false);
++    autoCSTest->setEnabled(true);
++}
++
++#include "smpppdcsprefsimpl.moc"
+--- kopete/plugins/smpppdcs/config/kopete_smpppdcs_config.desktop	(revision 0)
++++ kopete/plugins/smpppdcs/config/kopete_smpppdcs_config.desktop	(revision 504660)
+@@ -0,0 +1,85 @@
++[Desktop Entry]
++Encoding=UTF-8
++Icon=smpppdcs
++Type=Service
++ServiceTypes=KCModule
++
++X-KDE-ModuleType=Library
++X-KDE-Library=kopete_smpppdcs
++X-KDE-FactoryName=SMPPPDCSConfigFactory
++X-KDE-ParentApp=kopete_smpppdcs
++X-KDE-ParentComponents=kopete_smpppdcs
++
++X-Kopete-Version=1000900
++
++Name=SUSE SMPPPD Connection Status
++Name[bn]=SUSE SMPPPD সংযোগ অবস্থা
++Name[ca]=Estatus de la connexió SUSE SMPPPD 
++Name[cs]=Stav spojení SUSE SMPPPD
++Name[da]=SUSE SMPPD Forbindelsesstatus
++Name[de]=SuSE SMPPPD-Verbindungsstatus
++Name[el]=Κατάσταση σύνδεσης του SuSE SMPPPD
++Name[es]=Estado de conexión de SUSE SMPPPD
++Name[et]=SUSE SMPPPD ühenduse staatus
++Name[eu]=SUSE SMPPPD konexioaren egoera
++Name[fi]=SUSE SMPPPD -yhteyden tila
++Name[fr]=État de la connexion SUSE SMPPPD
++Name[ga]=Stádas Ceangail SUSE SMPPPD
++Name[gl]=Estado da conexión de SUSE SMPPPD
++Name[he]=מצב החיבור של SUSE SMPPPD
++Name[hu]=SUSE SMPPPD kapcsolati állapot
++Name[is]=SUSE SMPPPD tengingarstaða
++Name[it]=Stato della connessione di SUSE SMPPPD
++Name[lt]=SUSE SMPPPD ryšio būklė
++Name[nb]=Tilstand for SUSE-SMPPPD-forbindelsen
++Name[nl]=SUSE SMPPPD-verbindingsstatus
++Name[nn]=Tilstand for SUSE-SMPPPD-sambandet
++Name[pl]=Status połączenia SUSE SMPPPD
++Name[pt]=Estado da Ligação SUSE SMPPPD
++Name[pt_BR]=Status da Conexão SUSE SMPPPD
++Name[ru]=Статус соединения SUSE SMPPPD
++Name[sl]=Stanje povezave z uporabo SuSE SMPPPD
++Name[sr]=Статус SUSE-ове SMPPPD везе
++Name[sr at Latn]=Status SUSE-ove SMPPPD veze
++Name[sv]=SUSE SMPPPD anslutningsstatus
++Name[tr]=SUSE SMPPPD bağlantı durumu
++Name[uk]=Стан з'єднання SUSE SMPPPD
++Name[zh_CN]=SUSE SMPPPD 连接状态
++Name[zh_HK]=SUSE SMPPPD 連線狀態
++Comment=SMPPPDCS Plugin
++Comment[bn]=SMPPPDCS প্লাগিন
++Comment[br]=Lugant SMPPPDCS
++Comment[ca]=Connector SMPPPDCS
++Comment[cs]=SMPPPDCS modul
++Comment[da]=SMPPPDCS-Plugin
++Comment[de]=SMPPPDCS-Modul
++Comment[el]=Πρόσθετο SMPPPDCS
++Comment[es]=Extensión SMPPPDCS
++Comment[et]=SMPPPDCS plugin
++Comment[eu]=SMPPPDCS plugin-a
++Comment[fi]=SMPPPDCS-liitännäinen
++Comment[fr]=Module SMPPPDCS
++Comment[ga]=Breiseán SMPPPDCS
++Comment[gl]=Plugin SMPPPDCS
++Comment[he]=תוסף SMPPPDCS
++Comment[hu]=SMPPPDCS bővítőmodul
++Comment[is]=SMPPPDCS íforrit
++Comment[it]=Plugin SMPPPDCS
++Comment[lt]=SMPPPDCS įskiepis
++Comment[nb]=Programtillegg for SMPPPDCS
++Comment[nl]=SMPPPDCS-plugin
++Comment[nn]=Programtillegg for SMPPPDCS
++Comment[pl]=Wtyczka SMPPPDCS
++Comment[pt]='Plugin' SMPPPDCS
++Comment[pt_BR]=Plugin SMPPPDCS
++Comment[ro]=Modul SMPPPDCS
++Comment[ru]=Модуль SMPPPDCS
++Comment[sl]=Vstavek SMPPPDCS
++Comment[sr]=Прикључак SMPPPDCS
++Comment[sr at Latn]=Priključak SMPPPDCS
++Comment[sv]=SMPPPDCS-insticksprogram
++Comment[tr]=SMPPPDCS Eklentisi
++Comment[uk]=Втулок SMPPPDCS
++Comment[uz]=SMPPPDCS плагини
++Comment[zh_CN]=SMPPPDCS 插件
++Comment[zh_HK]=SMPPPDCS 插件
+--- kopete/plugins/smpppdcs/smpppdcsiface.h	(revision 502708)
++++ kopete/plugins/smpppdcs/smpppdcsiface.h	(revision 504660)
+@@ -30,7 +30,7 @@
+   k_dcop:
+ 
+     virtual QString detectionMethod() const = 0;
+-    virtual bool isOnline() const = 0;
++    virtual bool isOnline() = 0;
+ };
+ 
+ #endif
+--- kopete/plugins/smpppdcs/Makefile.am	(revision 502708)
++++ kopete/plugins/smpppdcs/Makefile.am	(revision 504660)
+@@ -1,35 +1,25 @@
++if include_smpppdcs
++SMPPPDCS_SUBDIR=config
++endif
++
+ METASOURCES = AUTO
+ 
+-SUBDIRS = icons libsmpppdclient unittest
++SUBDIRS = icons libsmpppdclient $(SMPPPDCS_SUBDIR)
+ 
+ EXTRA_DIST = Changelog.smpppdcs
+ 
+ AM_CPPFLAGS = $(KOPETE_INCLUDES) $(all_includes) -Ilibsmpppdclient
+ 
+-kde_module_LTLIBRARIES = kopete_smpppdcs.la kcm_kopete_smpppdcs.la
++kde_module_LTLIBRARIES = kopete_smpppdcs.la
+ 
+-kopete_smpppdcs_la_SOURCES = kinternetiface.stub smpppdcsplugin.cpp \
+-	onlineinquiry.cpp 	smpppdcsiface.skel detectordcop.cpp detectorsmpppd.cpp \
+-	detectornetstat.cpp detectornetworkstatus.cpp smpppdcsconfig.kcfgc
++kopete_smpppdcs_la_SOURCES = smpppdcsplugin.cpp onlineinquiry.cpp \
++	smpppdcsiface.skel detectordcop.cpp detectorsmpppd.cpp detectornetstat.cpp
+ kopete_smpppdcs_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+ kopete_smpppdcs_la_LIBADD = \
+ 	libsmpppdclient/libsmpppdclient.la ../../libkopete/libkopete.la
+ 
+-kcm_kopete_smpppdcs_la_SOURCES = smpppdcsprefs.ui smpppdcspreferences.cpp \
+-	smpppdsearcher.cpp smpppdcsprefsimpl.cpp smpppdlocationui.ui smpppdlocationwidget.cpp \
+-	smpppdcsconfig.kcfgc
+-kcm_kopete_smpppdcs_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries)
+-kcm_kopete_smpppdcs_la_LIBADD  = libsmpppdclient/libsmpppdclient.la \
+-	../../libkopete/libkopete.la $(LIB_KUTILS)
+-
+ service_DATA = kopete_smpppdcs.desktop
+ servicedir = $(kde_servicesdir)
+ 
+-kcm_DATA = kopete_smpppdcs_config.desktop
+-kcmdir = $(kde_servicesdir)/kconfiguredialog
+-
+-kde_kcfg_DATA = smpppdcs.kcfg
+-
+ noinst_HEADERS = smpppdcsiface.h detectordcop.h detectorsmpppd.h \
+-		detectornetstat.h kinternetiface.h detectornetworkstatus.h \
+-		smpppdsearcher.h smpppdcsprefsimpl.h smpppdlocationwidget.h
++	detectornetstat.h
+--- kopete/plugins/smpppdcs/detectorsmpppd.cpp	(revision 502708)
++++ kopete/plugins/smpppdcs/detectorsmpppd.cpp	(revision 504660)
+@@ -17,55 +17,54 @@
+ #include <kdebug.h>
+ #include <kglobal.h>
+ #include <kconfig.h>
+-#include <kapplication.h>
+ 
+ #include "iconnector.h"
+ #include "detectorsmpppd.h"
+-#include "smpppdcsconfig.h"
+ 
+ #include "smpppdclient.h"
+ 
+ DetectorSMPPPD::DetectorSMPPPD(IConnector * connector)
+-        : DetectorDCOP(connector) {}
++	: DetectorDCOP(connector) {}
+ 
+ DetectorSMPPPD::~DetectorSMPPPD() {}
+ 
+ /*!
+     \fn DetectorSMPPPD::checkStatus()
+  */
+-void DetectorSMPPPD::checkStatus() const {
++void DetectorSMPPPD::checkStatus() {
+     kdDebug(14312) << k_funcinfo << "Checking for online status..." << endl;
+ 
+-#ifndef NOKINTERNETDCOP
+-    m_kinternetApp = getKInternetDCOP();
+-    if(kapp->dcopClient() && m_kinternetApp != "") {
+-        switch(getConnectionStatusDCOP()) {
+-        case CONNECTED:
+-            m_connector->setConnectedStatus(true);
+-            return;
+-        case DISCONNECTED:
+-            m_connector->setConnectedStatus(false);
+-            return;
+-        default:
+-            break;
+-        }
+-    }
+-#else
+-#warning DCOP inquiry disabled
+-	kdDebug(14312) << k_funcinfo << "DCOP inquiry disabled" << endl;
+-#endif
++	m_kinternetApp = getKInternetDCOP();
++	if(m_client && m_kinternetApp != "") {
++		switch(getConnectionStatusDCOP()) {
++			case CONNECTED:
++				m_connector->setConnectedStatus(true);
++				return;
++			case DISCONNECTED:
++				m_connector->setConnectedStatus(false);
++				return;
++			default:
++				break;
++		}
++	}
++	
++	SMPPPD::Client c;
++	
++	static KConfig *config = KGlobal::config();
++	config->setGroup(SMPPPDCS_CONFIG_GROUP);
++	unsigned int port = config->readUnsignedNumEntry("port", 3185);
++	QString    server = config->readEntry("server", "localhost").utf8();
++	
++	c.setPassword(config->readEntry("Password", "").utf8());
++	
++	if(c.connect(server, port)) {
++		m_connector->setConnectedStatus(c.isOnline());
++	} else {
++		kdDebug(14312) << k_funcinfo << "not connected to smpppd => I'll try again later" << endl;
++		m_connector->setConnectedStatus(false);
++	}
++}
+ 
+-    SMPPPD::Client c;
+-
+-	unsigned int port = SMPPPDCSConfig::self()->port();
+-	QString    server = SMPPPDCSConfig::self()->server();
+-
+-	c.setPassword(SMPPPDCSConfig::self()->password().utf8());
+-
+-    if(c.connect(server, port)) {
+-        m_connector->setConnectedStatus(c.isOnline());
+-    } else {
+-        kdDebug(14312) << k_funcinfo << "not connected to smpppd => I'll try again later" << endl;
+-        m_connector->setConnectedStatus(false);
+-    }
++void DetectorSMPPPD::smpppdServerChange() {
++    kdDebug(14312) << k_funcinfo << "Server changed. Disconnect to SMPPPD" << endl;
+ }
+--- kopete/kopete/eventsrc	(revision 502708)
++++ kopete/kopete/eventsrc	(revision 504660)
+@@ -732,7 +732,7 @@
+ Comment[de]=Eine neue Nachricht befindet sich im Yahoo-Eingangsordner
+ Comment[el]=Μόλις έφτασε νέο email στα εισερχόμενα του Yahoo σας
+ Comment[es]=Tiene correo nuevo en la cuenta de Yahoo
+-Comment[et]=Saabus uus meil sinu Yahoo Inboxi
++Comment[et]=Saabus uus kiri sinu Yahoo Inboxi
+ Comment[eu]=E-posta berri bat jaso da zure Yahoo-ko sarrerako ontzian
+ Comment[fi]=Uutta postia saapunut Yahoo-sähköpostilaatikkoon
+ Comment[fr]=Un nouveau message est arrivé dans votre boîte aux lettres Yahoo
+@@ -815,7 +815,7 @@
+ Comment[de]=Eine neue Nachricht befindet sich im MSN-Eingangsordner
+ Comment[el]=Μόλις έφτασε νέο e-mail στα εισερχόμενα του MSN σας
+ Comment[es]=Tiene correo nuevo en la cuenta de MSN
+-Comment[et]=Saabus uus meil sinu MSN Inboxi
++Comment[et]=Saabus uus kiri sinu MSN Inboxi
+ Comment[eu]=E-posta berri bat jaso da zure MSN-ko sarrerako ontzian
+ Comment[fi]=Uutta postia saapunut MSN-sähköpostilaatikkoon
+ Comment[fr]=Un nouveau message est arrivé dans votre boîte aux lettres MSN
+--- kget/kmainwidget.cpp	(revision 502708)
++++ kget/kmainwidget.cpp	(revision 504660)
+@@ -46,6 +46,7 @@
+ #include <qtimer.h>
+ #include <qdropsite.h>
+ #include <qpopupmenu.h>
++#include <qfileinfo.h>
+ #include <kinputdialog.h>
+ 
+ #include <kprotocolinfo.h>
+@@ -68,6 +69,7 @@
+ #include <knotifyclient.h>
+ #include <knotifydialog.h>
+ #include <kmenubar.h>
++#include <kio/renamedlg.h>
+ 
+ #include "safedelete.h"
+ #include "settings.h"
+@@ -91,6 +93,11 @@
+ #include "slave.h"
+ #include "slaveevent.h"
+ 
++struct KURLPair
++{
++	KURL dest;
++	KURL src;
++};
+ 
+ KMainWidget *kmain = 0L;
+ 
+@@ -1151,21 +1158,22 @@
+ 
+ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir )
+ {
+-    KURL::List urlsToDownload;
++    QValueList<KURLPair> urls_orig;
+ 
+     for ( KURL::List::ConstIterator it = src.begin(); it != src.end(); ++it )
+     {
+-        KURL url = *it;
+-        if ( url.fileName().endsWith( ".kgt" ) )
+-            readTransfersEx(url);
++        KURLPair url;
++        url.src = *it;
++        if ( url.src.fileName().endsWith( ".kgt" ) )
++            readTransfersEx(url.src);
+         else
+-            urlsToDownload.append( url );
++            urls_orig.append( url );
+     }
+ 
+-    if ( urlsToDownload.isEmpty() )
++    if ( urls_orig.isEmpty() )
+         return;
+ 
+-    if ( urlsToDownload.count() == 1 ) // just one file -> ask for filename
++    if ( urls_orig.count() == 1 ) // just one file -> ask for filename
+     {
+         KURL destFile;
+ 
+@@ -1173,7 +1181,7 @@
+         {
+             // create a proper destination file from destDir
+             KURL destURL = KURL::fromPathOrURL( destDir );
+-            QString fileName = urlsToDownload.first().fileName();
++            QString fileName = urls_orig.first().src.fileName();
+ 
+             // in case the fileName is empty, we simply ask for a filename in
+             // addTransferEx. Do NOT attempt to use an empty filename, that
+@@ -1198,66 +1206,120 @@
+             }
+         }
+ 
+-        addTransferEx( urlsToDownload.first(), destFile );
++        addTransferEx( urls_orig.first().src, destFile );
+         return;
+     }
+ 
+     // multiple files -> ask for directory, not for every single filename
+-    KURL dest;
+-    if ( destDir.isEmpty() || !QFileInfo( destDir ).isDir() )
+-    {
+-        if ( !destDir.isEmpty()  )
+-            dest.setPath( destDir );
+-        else
+-            dest.setPath( getSaveDirectoryFor( src.first().fileName() ) );
++	
++	bool dir_accepted = false;
++	QValueList<KURLPair>::Iterator it;
++	QValueList<KURLPair> urls;
++	KURL::List urlsToDelete;
++	while ( !dir_accepted )
++	{
++		urlsToDelete.clear();
++		urls = urls_orig;	// copy the list here, urls might be changed, yet when we return here (Cancel),
++							// we want to start again with the original list 
++		dir_accepted = true; //Set to false later when Cancel is pressed
++		KURL dest;
++		if ( destDir.isEmpty() || !QFileInfo( destDir ).isDir() )
++		{
++			if ( !destDir.isEmpty()  )
++				dest.setPath( destDir );
++			else
++				dest.setPath( getSaveDirectoryFor( src.first().fileName() ) );
+ 
+-        // ask in any case, when destDir is empty
+-        if ( destDir.isEmpty() || !QFileInfo( dest.path() ).isDir() )
+-        {
+-            QString dir = KFileDialog::getExistingDirectory( dest.path() );
+-            if ( dir.isEmpty() ) // aborted
+-                return;
++            // ask in any case, when destDir is empty
++			if ( destDir.isEmpty() || !QFileInfo( dest.path() ).isDir() )
++			{
++				QString dir = KFileDialog::getExistingDirectory( dest.path() );
++				if ( dir.isEmpty() ) // aborted
++					return;
+ 
+-            dest.setPath( dir );
+-            ksettings.lastDirectory = dir;
+-        }
+-    }
++				dest.setPath( dir );
++				ksettings.lastDirectory = dir;
++			}
++		}
+ 
+-    // dest is now finally the real destination directory for all the files
+-    dest.adjustPath(+1);
++        // dest is now finally the real destination directory for all the files
++		dest.adjustPath(+1);
+ 
+-    int numdl = 0;
+-    // create new transfer items
+-    KURL::List::ConstIterator it = urlsToDownload.begin();
+-    for ( ; it != urlsToDownload.end(); ++it )
+-    {
+-        KURL srcURL = *it;
++        // create new transfer items
++		bool skip_all = false;
++		bool overwrite_all = false;
++		it = urls.begin();
++		KIO::RenameDlg_Result result;
++		while ( it != urls.end() )
++		{
++			
++			if ( !sanityChecksSuccessful( (*it).src ) )
++			{
++				it = urls.erase( it );
++				continue; // shouldn't we notify the user??
++			}
++			
++			(*it).dest = dest;
++			QString fileName = (*it).src.fileName();
++			if ( fileName.isEmpty() ) // simply use the full url as filename
++				fileName = KURL::encode_string_no_slash( (*it).src.prettyURL() );
+ 
+-        if ( !sanityChecksSuccessful( *it ) )
+-            continue;
++			(*it).dest.setFileName( fileName );
+ 
+-        KURL destURL = dest;
+-        QString fileName = (*it).fileName();
+-        if ( fileName.isEmpty() ) // simply use the full url as filename
+-            fileName = KURL::encode_string_no_slash( (*it).prettyURL() );
++			if( KIO::NetAccess::exists((*it).dest, false, this))
++			{
++				QString newdest;
++				if (skip_all)
++					result = KIO::R_SKIP;
++				else if( overwrite_all )
++					result = KIO::R_OVERWRITE;
++				else
++				{
++					QFileInfo finfo( (*it).dest.path() );
++					QString caption = i18n( "File Already exists" ) + " - KGet";
++					result = KIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), KIO::RenameDlg_Mode(KIO::M_OVERWRITE|KIO::M_SKIP|KIO::M_MULTI), newdest, (KIO::filesize_t) -1, (KIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t());
++				}
++				switch (result)
++				{
++					case KIO::R_RENAME:
++						(*it).dest = KURL::fromPathOrURL( newdest );
++						break;
++					case KIO::R_OVERWRITE_ALL:
++						overwrite_all = true; //fall through
++					case KIO::R_OVERWRITE:
++						urlsToDelete.append( (*it).dest );
++						break;
++					case KIO::R_AUTO_SKIP:
++						skip_all = true;	
++					case KIO::R_SKIP:			//fall through
++						it = urls.erase( it );
++						continue;
++						break;
++					default:               // Cancel, ask again for directory
++						dir_accepted = false;
++				}
++				if ( !dir_accepted )
++					break;
++			}   // if(KIO::NetAccess::exists
++			++it;
++		} //  while ( it != urls.end() )
++	} //  while ( !dir_accepted )
+ 
+-        destURL.setFileName( fileName );
++	KURL::List::Iterator it_1 = urlsToDelete.begin();
++	for ( ; it_1 != urlsToDelete.end(); ++it_1 )
++	{
++		SafeDelete::deleteFile( *it_1 );
++	}
++	
++	int numdl = 0;
++	it = urls.begin();
++	for ( ; it != urls.end(); ++it )
++	{
++		Transfer *item = myTransferList->addTransfer((*it).src, (*it).dest);
++		item->updateAll(); // update the remaining fields
++		numdl++;
++	}
+ 
+-        if(KIO::NetAccess::exists(destURL, false, this))
+-        {
+-            if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL() ), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
+-                                          == KMessageBox::Yes)
+-            {
+-                SafeDelete::deleteFile( destURL );
+-            }
+-        }
+-
+-        Transfer *item = myTransferList->addTransfer(*it, destURL);
+-        item->updateAll(); // update the remaining fields
+-
+-        numdl++;
+-    }
+-
+     KNotifyClient::event(kdock->winId(), "added", i18n("1 download has been added.", "%n downloads have been added.", numdl));
+ 
+     myTransferList->clearSelection();




More information about the pkg-kde-commits mailing list