summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressbook.cpp2
-rw-r--r--kabc/kabcE.pro2
-rw-r--r--kabc/plugins/dir/resourcedir.cpp7
-rw-r--r--kabc/plugins/dir/resourcedir.h2
-rw-r--r--kabc/plugins/file/resourcefile.cpp14
-rw-r--r--kabc/plugins/file/resourcefile.h4
-rw-r--r--kabc/plugins/ldap/resourceldap.cpp7
-rw-r--r--kabc/plugins/ldap/resourceldap.h2
-rw-r--r--kabc/plugins/opie/resourceopie.cpp11
-rw-r--r--kabc/plugins/opie/resourceopie.h4
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp11
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.h4
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp8
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.h4
-rw-r--r--kabc/resource.cpp32
-rw-r--r--kabc/resource.h16
-rw-r--r--kaddressbook/xxportobject.cpp4
-rw-r--r--microkde/kresources/configdialog.cpp105
-rw-r--r--microkde/kresources/configdialog.h5
-rw-r--r--microkde/kresources/configpage.cpp25
-rw-r--r--microkde/kresources/factory.cpp38
-rw-r--r--microkde/kresources/factory.h15
-rw-r--r--microkde/kresources/manager.h12
-rw-r--r--microkde/kresources/managerimpl.cpp13
-rw-r--r--microkde/kresources/managerimpl.h8
-rw-r--r--microkde/kresources/resource.cpp1
-rw-r--r--microkde/kresources/resource.h24
-rw-r--r--microkde/microkdeE.pro2
28 files changed, 78 insertions, 304 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 592d78d..c584c35 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -279,3 +279,3 @@ void AddressBook::init(const QString &config, const QString &family )
//US d->mErrorHandler = 0;
- d->mManager = new KRES::Manager<Resource>( fami, false );
+ d->mManager = new KRES::Manager<Resource>( fami );
d->mManager->readConfig( d->mConfig );
diff --git a/kabc/kabcE.pro b/kabc/kabcE.pro
index 061909b..96fe39e 100644
--- a/kabc/kabcE.pro
+++ b/kabc/kabcE.pro
@@ -43,3 +43,2 @@ HEADERS = \
stdaddressbook.h \
- syncprefwidget.h \
timezone.h \
@@ -148,3 +147,2 @@ SOURCES = \
stdaddressbook.cpp \
- syncprefwidget.cpp \
timezone.cpp \
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index e58e4f7..e2b7b08 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -60,3 +60,2 @@ $Id$
#include "resourcedir.h"
-#include "syncprefwidget.h"
@@ -76,3 +75,3 @@ __declspec(dllexport)
{
- return new KRES::PluginFactory<ResourceDir,ResourceDirConfig, SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>();
}
@@ -82,4 +81,4 @@ __declspec(dllexport)
-ResourceDir::ResourceDir( const KConfig *config, bool syncable )
- : Resource( config, syncable )
+ResourceDir::ResourceDir( const KConfig *config )
+ : Resource( config )
{
diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h
index 77cd18c..6c1e922 100644
--- a/kabc/plugins/dir/resourcedir.h
+++ b/kabc/plugins/dir/resourcedir.h
@@ -51,3 +51,3 @@ class ResourceDir : public Resource
public:
- ResourceDir( const KConfig*, bool syncable );
+ ResourceDir( const KConfig* );
~ResourceDir();
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 163f2b4..dc5932f 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -53,3 +53,2 @@ $Id$
#include "resourcefile.h"
-#include "syncprefwidget.h"
@@ -71,3 +70,3 @@ __declspec(dllexport)
{
- return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>();
}
@@ -77,4 +76,4 @@ __declspec(dllexport)
-ResourceFile::ResourceFile( const KConfig *config, bool syncable )
- : Resource( config, syncable ) , mFormat( 0 )
+ResourceFile::ResourceFile( const KConfig *config )
+ : Resource( config ) , mFormat( 0 )
{
@@ -82,5 +81,2 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable )
- if (syncable == true)
- default_fileName = "/home/polo/kdepim/apps/kabc/localfile.vcf";
- else
default_fileName = StdAddressBook::fileName();
@@ -99,5 +95,5 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable )
-ResourceFile::ResourceFile( const QString &fileName, bool syncable ,
+ResourceFile::ResourceFile( const QString &fileName ,
const QString &formatName )
- : Resource( 0, syncable )
+ : Resource( 0 )
{
diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h
index 8339340..b4421b2 100644
--- a/kabc/plugins/file/resourcefile.h
+++ b/kabc/plugins/file/resourcefile.h
@@ -60,3 +60,3 @@ public:
*/
- ResourceFile( const KConfig *cfg, bool syncable );
+ ResourceFile( const KConfig *cfg );
@@ -65,3 +65,3 @@ public:
*/
- ResourceFile( const QString &fileName, bool syncable , const QString &formatName = "vcard" );
+ ResourceFile( const QString &fileName , const QString &formatName = "vcard" );
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp
index 17f115d..55c43af 100644
--- a/kabc/plugins/ldap/resourceldap.cpp
+++ b/kabc/plugins/ldap/resourceldap.cpp
@@ -38,3 +38,2 @@ $Id$
#include "resourceldapconfig.h"
-#include "syncprefwidget.h"
@@ -47,3 +46,3 @@ extern "C"
{
- return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig>();
}
@@ -54,4 +53,4 @@ void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value );
-ResourceLDAP::ResourceLDAP( const KConfig *config, bool syncable )
- : Resource( config, syncable ), mPort( 389 ), mLdap( 0 )
+ResourceLDAP::ResourceLDAP( const KConfig *config )
+ : Resource( config ), mPort( 389 ), mLdap( 0 )
{
diff --git a/kabc/plugins/ldap/resourceldap.h b/kabc/plugins/ldap/resourceldap.h
index 0aad3c1..0625f30 100644
--- a/kabc/plugins/ldap/resourceldap.h
+++ b/kabc/plugins/ldap/resourceldap.h
@@ -45,3 +45,3 @@ public:
- ResourceLDAP( const KConfig*, bool syncable );
+ ResourceLDAP( const KConfig* );
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index 22237dc..f610b38 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -52,3 +52,2 @@ $Id$
#include "stdaddressbook.h"
-#include "syncprefwidget.h"
@@ -63,3 +62,3 @@ extern "C"
{
- return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>();
}
@@ -67,4 +66,4 @@ extern "C"
-ResourceOpie::ResourceOpie( const KConfig *config, bool syncable )
- : Resource( config, syncable ), mAccess(0), mConverter (0)
+ResourceOpie::ResourceOpie( const KConfig *config )
+ : Resource( config ), mAccess(0), mConverter (0)
{
@@ -81,4 +80,4 @@ ResourceOpie::ResourceOpie( const KConfig *config, bool syncable )
-ResourceOpie::ResourceOpie( const QString &fileName, bool syncable )
- : Resource( 0, syncable )
+ResourceOpie::ResourceOpie( const QString &fileName )
+ : Resource( 0 )
{
diff --git a/kabc/plugins/opie/resourceopie.h b/kabc/plugins/opie/resourceopie.h
index d5b4ebd..9d05c70 100644
--- a/kabc/plugins/opie/resourceopie.h
+++ b/kabc/plugins/opie/resourceopie.h
@@ -59,3 +59,3 @@ public:
*/
- ResourceOpie( const KConfig *cfg, bool syncable );
+ ResourceOpie( const KConfig *cfg );
@@ -64,3 +64,3 @@ public:
*/
- ResourceOpie( const QString &fileName, bool syncable );
+ ResourceOpie( const QString &fileName );
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index f9cabcb..deb218b 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -51,3 +51,2 @@ $Id$
#include "qtopiaconverter.h"
-#include "syncprefwidget.h"
@@ -60,3 +59,3 @@ extern "C"
{
- return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig, SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig>();
}
@@ -64,4 +63,4 @@ extern "C"
-ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable )
- : Resource( config, syncable ), mConverter (0)
+ResourceQtopia::ResourceQtopia( const KConfig *config )
+ : Resource( config ), mConverter (0)
{
@@ -72,4 +71,4 @@ ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable )
-ResourceQtopia::ResourceQtopia( const QString &fileName, bool syncable )
- : Resource( 0, syncable )
+ResourceQtopia::ResourceQtopia( const QString &fileName )
+ : Resource( 0 )
{
diff --git a/kabc/plugins/qtopia/resourceqtopia.h b/kabc/plugins/qtopia/resourceqtopia.h
index eace280..ff6350d 100644
--- a/kabc/plugins/qtopia/resourceqtopia.h
+++ b/kabc/plugins/qtopia/resourceqtopia.h
@@ -60,3 +60,3 @@ public:
*/
- ResourceQtopia( const KConfig *cfg, bool syncable );
+ ResourceQtopia( const KConfig *cfg );
@@ -65,3 +65,3 @@ public:
*/
- ResourceQtopia( const QString &fileName, bool syncable );
+ ResourceQtopia( const QString &fileName );
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index c013f52..2cdf4bf 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -52,4 +52,2 @@ $Id$
-#include "syncprefwidget.h"
-
#include "stdaddressbook.h"
@@ -63,3 +61,3 @@ extern "C"
{
- return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig,SyncPrefWidgetContainer>();
+ return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig>();
}
@@ -67,4 +65,4 @@ extern "C"
-ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable )
- : Resource( config, syncable ), mConverter (0)
+ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
+ : Resource( config ), mConverter (0)
{
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.h b/kabc/plugins/sharpdtm/resourcesharpdtm.h
index f386e69..64d06f9 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.h
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.h
@@ -60,3 +60,3 @@ public:
*/
- ResourceSharpDTM( const KConfig *cfg, bool syncable );
+ ResourceSharpDTM( const KConfig *cfg );
@@ -65,3 +65,3 @@ public:
*/
- ResourceSharpDTM( const QString &fileName, bool syncable );
+ ResourceSharpDTM( const QString &fileName );
diff --git a/kabc/resource.cpp b/kabc/resource.cpp
index 7b91239..267cdaf 100644
--- a/kabc/resource.cpp
+++ b/kabc/resource.cpp
@@ -29,4 +29,2 @@ $Id$
-#include <ksyncprofile.h>
-
#include "resource.h"
@@ -35,10 +33,5 @@ using namespace KABC;
-Resource::Resource( const KConfig *config, bool syncable )
- : KRES::Resource( config ), mAddressBook( 0 ), mSyncProfile( 0 )
+Resource::Resource( const KConfig *config )
+ : KRES::Resource( config ), mAddressBook( 0 )
{
- if(syncable == true) {
- mSyncProfile = new KSyncProfile( );
- mSyncProfile->setName("pending" /*resourceName()*/);
- mSyncProfile->readConfig( (KConfig *)config );
- }
}
@@ -47,5 +40,2 @@ Resource::~Resource()
{
- if (mSyncProfile != 0) {
- delete mSyncProfile;
- }
}
@@ -55,5 +45,2 @@ void Resource::writeConfig( KConfig *config )
KRES::Resource::writeConfig( config );
-
- if(mSyncProfile != 0)
- mSyncProfile->writeConfig( config );
}
@@ -110,13 +97,2 @@ void Resource::cleanUp()
-bool Resource::isSyncable() const
-{
- return (mSyncProfile != 0);
-}
-
-KSyncProfile* Resource::getSyncProfile()
-{
- return mSyncProfile;
-}
-
-
QString Resource::fileName() const
@@ -138,6 +114,2 @@ void Resource::setResourceName( const QString &name )
KRES::Resource::setResourceName(name);
- if(mSyncProfile != 0) {
- mSyncProfile->setName( name );
- }
-
}
diff --git a/kabc/resource.h b/kabc/resource.h
index 2024d2d..e5f0d5d 100644
--- a/kabc/resource.h
+++ b/kabc/resource.h
@@ -35,4 +35,2 @@ $Id$
-class KSyncProfile;
-
namespace KABC {
@@ -62,8 +60,2 @@ class Resource : public KRES::Resource
{
-private:
- /**
- * make this constructor private to force everybody to use the other one
- */
- Resource( const KConfig *config);
-
public:
@@ -72,3 +64,3 @@ public:
*/
- Resource( const KConfig *config, bool syncable );
+ Resource( const KConfig *config );
@@ -141,7 +133,2 @@ public:
-
- virtual bool isSyncable() const;
-
- virtual KSyncProfile* getSyncProfile();
-
/**
@@ -160,3 +147,2 @@ private:
AddressBook *mAddressBook;
- KSyncProfile *mSyncProfile;
QString mFileName;
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp
index 4351753..67e8406 100644
--- a/kaddressbook/xxportobject.cpp
+++ b/kaddressbook/xxportobject.cpp
@@ -178,3 +178,3 @@ bool XXPortResourceObject::_exportContacts( const KABC::AddresseeList &list, con
//create new resource
- KABC::Resource* mResource = (KABC::Resource*)(mFactory->resource( this->identifier(), 0, false ));
+ KABC::Resource* mResource = (KABC::Resource*)(mFactory->resource( this->identifier(), 0 ));
@@ -238,3 +238,3 @@ KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identi
- KABC::Resource* mResource = (KABC::Resource*)(mFactory->resource( this->identifier(), 0, false ));
+ KABC::Resource* mResource = (KABC::Resource*)(mFactory->resource( this->identifier(), 0 ));
diff --git a/microkde/kresources/configdialog.cpp b/microkde/kresources/configdialog.cpp
index 030b547..24e82bc 100644
--- a/microkde/kresources/configdialog.cpp
+++ b/microkde/kresources/configdialog.cpp
@@ -43,3 +43,2 @@
#include "configdialog.h"
-#include "syncwidget.h"
@@ -49,4 +48,4 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
Resource* resource, const char *name )
- : KDialogBase( parent, name, true, resource->isSyncable()?i18n( "Sync Profile Configuration" ):i18n( "Resource Configuration" ),
- Ok|Cancel, Ok, true )/*, mConfig( config )*/, mSyncWidget_Settings(0), mSyncWidget_Conflicts(0),mSyncWidget_Remote(0), mResource( resource ), mPersistentReadOnly(false)
+ : KDialogBase( parent, name, true, i18n( "Resource Configuration" ),
+ Ok|Cancel, Ok, true )/*, mConfig( config )*/, mResource( resource ), mPersistentReadOnly(false)
{
@@ -60,6 +59,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
- if (!mResource->isSyncable())
main = plainPage();
- else
- main = addPage("Profile");
@@ -72,3 +68,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
- new QLabel( mResource->isSyncable()?i18n( "Profile Name:" ):i18n( "Name:" ), generalGroupBox );
+ new QLabel( i18n( "Name:" ), generalGroupBox );
@@ -76,3 +72,2 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
- if (!mResource->isSyncable()) {
new QLabel("", generalGroupBox );
@@ -80,2 +75,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
mReadOnly->setChecked( mResource->readOnly() );
+
new QLabel("", generalGroupBox );
@@ -83,3 +79,2 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
mIncludeInSync->setChecked( mResource->includeInSync() );
- }
@@ -101,2 +96,4 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
SLOT( setReadOnly( bool ) ) );
+ connect( mConfigWidget, SIGNAL( setIncludeInSync( bool ) ),
+ SLOT( setIncludeInSync( bool ) ) );
connect( mConfigWidget, SIGNAL( setPersistentReadOnly( bool ) ),
@@ -109,55 +106,2 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
- if (mResource->isSyncable())
- {
- SyncWidgetContainer* c = factory->syncWidgetContainer( resource->type() );
-
- QFrame* syncPage = addPage("Settings");
- QVBoxLayout *syncLayout = new QVBoxLayout( syncPage, 0, spacingHint() );
- mSyncWidget_Settings = c->generateSettingsTab(syncPage);
- syncLayout->addWidget( mSyncWidget_Settings );
-
- syncPage = addPage("Conflicts");
- syncLayout = new QVBoxLayout( syncPage, 0, spacingHint() );
- mSyncWidget_Conflicts = c->generateConflictsTab(syncPage);
- syncLayout->addWidget( mSyncWidget_Conflicts );
-
- syncPage = addPage("Remote");
- syncLayout = new QVBoxLayout( syncPage, 0, spacingHint() );
- mSyncWidget_Remote = c->generateRemoteTab(syncPage);
- syncLayout->addWidget( mSyncWidget_Remote );
-
-
- mSyncWidget_Settings->setInEditMode( false );
- mSyncWidget_Settings->loadSettings( mResource );
- mSyncWidget_Settings->show();
-
- mSyncWidget_Conflicts->setInEditMode( false );
- mSyncWidget_Conflicts->loadSettings( mResource );
- mSyncWidget_Conflicts->show();
-
- mSyncWidget_Remote->setInEditMode( false );
- mSyncWidget_Remote->loadSettings( mResource );
- mSyncWidget_Remote->show();
-
- delete c;
-
-// QGroupBox *syncGroupBox = new QGroupBox( 2, Qt::Horizontal, syncPage );
-// syncGroupBox->layout()->setSpacing( spacingHint());
-// syncGroupBox->setTitle( i18n( "Syncronize Preferences" ) );
-// syncLayout->addWidget( syncGroupBox );
-
-// syncLayout->addStretch();
-/*US
- mSyncWidget = factory->syncWidget( resource->type(), syncPage );
- syncLayout->addWidget( mSyncWidget );
- if ( mSyncWidget ) {
- mSyncWidget->setInEditMode( false );
- mSyncWidget->loadSettings( mResource );
- mSyncWidget->show();
- }
- */
- }
-
-
-
@@ -177,10 +121,2 @@ void ConfigDialog::setInEditMode( bool value )
mConfigWidget->setInEditMode( value );
-
- if ( mSyncWidget_Settings )
- mSyncWidget_Settings->setInEditMode( value );
- if ( mSyncWidget_Conflicts )
- mSyncWidget_Conflicts->setInEditMode( value );
- if ( mSyncWidget_Remote )
- mSyncWidget_Remote->setInEditMode( value );
-
}
@@ -194,4 +130,2 @@ void ConfigDialog::setReadOnly( bool value )
{
- if (!mResource->isSyncable()) {
-
if (mPersistentReadOnly == false)
@@ -201,2 +135,9 @@ void ConfigDialog::setReadOnly( bool value )
}
+
+void ConfigDialog::setIncludeInSync( bool value )
+{
+ if (mPersistentReadOnly == false)
+ mIncludeInSync->setChecked( value );
+ else
+ mIncludeInSync->setChecked( true );
}
@@ -205,12 +146,13 @@ void ConfigDialog::setPersistentReadOnly( bool value )
{
- if (!mResource->isSyncable()) {
-
mPersistentReadOnly = value;
- if (value == true)
+ if (value == true) {
setReadOnly( true );
+ setIncludeInSync( true );
+ }
mReadOnly->setEnabled( !value );
+ mIncludeInSync->setEnabled (!value );
}
-}
+
@@ -219,3 +161,3 @@ void ConfigDialog::accept()
if ( mName->text().isEmpty() ) {
- KMessageBox::sorry( this, mResource->isSyncable()?i18n( "Please enter a profile name" ):i18n( "Please enter a resource name" ) );
+ KMessageBox::sorry( this, i18n( "Please enter a resource name" ) );
return;
@@ -224,3 +166,2 @@ void ConfigDialog::accept()
mResource->setResourceName( mName->text() );
- if (!mResource->isSyncable())
mResource->setReadOnly( mReadOnly->isChecked() );
@@ -234,10 +175,2 @@ void ConfigDialog::accept()
- if ( mSyncWidget_Settings )
- mSyncWidget_Settings->saveSettings( mResource );
- if ( mSyncWidget_Conflicts )
- mSyncWidget_Conflicts->saveSettings( mResource );
- if ( mSyncWidget_Remote )
- mSyncWidget_Remote->saveSettings( mResource );
-
-
KDialog::accept();
diff --git a/microkde/kresources/configdialog.h b/microkde/kresources/configdialog.h
index ed3ecab..b205975 100644
--- a/microkde/kresources/configdialog.h
+++ b/microkde/kresources/configdialog.h
@@ -33,3 +33,2 @@ namespace KRES {
class ConfigWidget;
- class SyncWidget;
@@ -48,2 +47,3 @@ class ConfigDialog : public KDialogBase
void setReadOnly( bool value );
+ void setIncludeInSync( bool value );
void setPersistentReadOnly( bool value );
@@ -53,5 +53,2 @@ class ConfigDialog : public KDialogBase
ConfigWidget *mConfigWidget;
- SyncWidget *mSyncWidget_Settings;
- SyncWidget *mSyncWidget_Conflicts;
- SyncWidget *mSyncWidget_Remote;
Resource* mResource;
diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp
index 02c5fb1..533be51 100644
--- a/microkde/kresources/configpage.cpp
+++ b/microkde/kresources/configpage.cpp
@@ -59,5 +59,2 @@ using namespace KRES;
-const QString ConfigPage::syncfamily = "syncprofiles";
-
-
class ConfigViewItem : public QCheckListItem
@@ -186,3 +183,3 @@ void ConfigPage::load()
QStringList families;
- families << "contact" << syncfamily;
+ families << "contact";
@@ -194,3 +191,3 @@ void ConfigPage::load()
if ( !mFamilyMap.contains( family ) ) {
- mCurrentManager = new Manager<Resource>( family, (family == syncfamily) );
+ mCurrentManager = new Manager<Resource>( family );
if ( mCurrentManager ) {
@@ -207,4 +204,2 @@ void ConfigPage::load()
info.mConfig = new KConfig( locateLocal( "config", "kcalrc" ) );
- } else if ( family == syncfamily && QFile::exists( configDir + "/kabcsyncrc" ) ) {
- info.mConfig = new KConfig( locateLocal( "config", "kabcsyncrc" ) );
} else {
@@ -312,10 +307,2 @@ void ConfigPage::slotAdd()
- if (mFamily == syncfamily)
- {
- desc = QInputDialog::getItem( i18n( "Sync Configuration" ),
- i18n( "Select resource type for the new sync profile:" ), descs, 0,
- false, &ok, this );
- }
- else
- {
desc = QInputDialog::getItem( i18n( "Resource Configuration" ),
@@ -323,3 +310,2 @@ void ConfigPage::slotAdd()
false, &ok, this );
- }
@@ -338,10 +324,3 @@ void ConfigPage::slotAdd()
- if (mFamily == syncfamily)
- {
- resource->setResourceName( type + "-syncprofile" );
- }
- else
- {
resource->setResourceName( type + "-resource" );
- }
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index e44fce3..4e4456d 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -189,36 +189,2 @@ ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
-SyncWidgetContainer *Factory::syncWidgetContainer( const QString& type )
-{
- if ( type.isEmpty() || !mTypeMap.contains( type ) )
- return 0;
-
-//US KService::Ptr ptr = mTypeMap[ type ];
-//US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() );
- PluginInfo* pi = mTypeMap[ type ];
- KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() );
- if ( !factory ) {
- qDebug("KRES::Factory::syncWidget(): Factory creation failed for library %s", pi->library.latin1());
- kdDebug() << "KRES::Factory::syncWidget(): Factory creation failed" << endl;
- return 0;
- }
-
- PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory );
-
- if ( !pluginFactory ) {
- qDebug("KRES::Factory::syncWidget(): no plugin factory for library %s", pi->library.latin1());
- kdDebug() << "KRES::Factory::syncWidget(): no plugin factory." << endl;
- return 0;
- }
-
- SyncWidgetContainer *wdg = pluginFactory->syncWidgetContainer( );
- if ( !wdg ) {
-//US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl;
- qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1());
- return 0;
- }
- return wdg;
-
-}
-
-
QString Factory::typeName( const QString &type ) const
@@ -247,3 +213,3 @@ QString Factory::typeDescription( const QString &type ) const
-Resource *Factory::resource( const QString& type, const KConfig *config, bool syncable )
+Resource *Factory::resource( const QString& type, const KConfig *config )
{
@@ -278,3 +244,3 @@ Resource *Factory::resource( const QString& type, const KConfig *config, bool sy
- Resource *resource = pluginFactory->resource( config, syncable );
+ Resource *resource = pluginFactory->resource( config );
if ( !resource ) {
diff --git a/microkde/kresources/factory.h b/microkde/kresources/factory.h
index 0e4231b..ea01b23 100644
--- a/microkde/kresources/factory.h
+++ b/microkde/kresources/factory.h
@@ -36,3 +36,2 @@ namespace KRES {
-class SyncWidgetContainer;
class ConfigWidget;
@@ -89,13 +88,2 @@ class Factory
/**
- * Returns the sync widget for the given resource type,
- * or a null pointer if resource type doesn't exist,
- * or a null pointer if resource does not support syncing.
- *
- * @param type The type of the resource, returned by @ref resources()
- * @param resource The resource to be editted.
- * @param parent The parent widget
- */
- SyncWidgetContainer *syncWidgetContainer( const QString& type );
-
- /**
* Returns a pointer to a resource object or a null pointer
@@ -106,5 +94,4 @@ class Factory
* @param config The config object where the resource get it settings from, or 0 if a new resource should be created.
- * @param syncable If the resource should support syncing capabilities.
*/
- Resource *resource( const QString& type, const KConfig *config, bool syncable );
+ Resource *resource( const QString& type, const KConfig *config);
diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h
index 7e9e19a..0e6f838 100644
--- a/microkde/kresources/manager.h
+++ b/microkde/kresources/manager.h
@@ -169,8 +169,3 @@ class Manager : private ManagerImplListener
- /**
- Return true, if the manager manages syncable resources.
- */
- bool manageSyncable() { return mImpl->manageSyncable(); }
-
- Manager( const QString &family, bool syncable )
+ Manager( const QString &family )
{
@@ -179,3 +174,3 @@ class Manager : private ManagerImplListener
// because of the Factory::self() pattern
- mImpl = new ManagerImpl( family, syncable );
+ mImpl = new ManagerImpl( family );
mImpl->setListener( this );
@@ -262,3 +257,2 @@ class Manager : private ManagerImplListener
by @ref resourceTypeNames()
- * @param syncable If the resource should support syncing capabilities.
*/
@@ -266,3 +260,3 @@ class Manager : private ManagerImplListener
{
- return (T *)( mFactory->resource( type, 0, mImpl->manageSyncable() ) );
+ return (T *)( mFactory->resource( type, 0 ) );
}
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp
index 3655f50..81bbbec 100644
--- a/microkde/kresources/managerimpl.cpp
+++ b/microkde/kresources/managerimpl.cpp
@@ -43,4 +43,4 @@ using namespace KRES;
-ManagerImpl::ManagerImpl( const QString &family, bool syncable )
- : mFamily( family ), mSyncable(syncable), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ),
+ManagerImpl::ManagerImpl( const QString &family )
+ : mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ),
mFactory( 0 )
@@ -270,3 +270,3 @@ Resource* ManagerImpl::readResourceConfig( const QString& identifier,
QString name = mConfig->readEntry( "ResourceName" );
- Resource *resource = mFactory->resource( type, mConfig, mSyncable );
+ Resource *resource = mFactory->resource( type, mConfig );
if ( !resource ) {
@@ -366,9 +366,2 @@ Resource* ManagerImpl::getResource( const QString& identifier )
-/**
- Return true, if the manager manages syncable resources.
-*/
-bool ManagerImpl::manageSyncable() const
-{
- return mSyncable;
-}
diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h
index 0425279..56a2db6 100644
--- a/microkde/kresources/managerimpl.h
+++ b/microkde/kresources/managerimpl.h
@@ -67,3 +67,3 @@ class ManagerImpl : public QObject
public:
- ManagerImpl( const QString &family, bool syncable);
+ ManagerImpl( const QString &family);
~ManagerImpl();
@@ -92,7 +92,2 @@ class ManagerImpl : public QObject
- /**
- Return true, if the manager manages syncable resources.
- */
- bool manageSyncable() const;
-
public slots:
@@ -114,3 +109,2 @@ class ManagerImpl : public QObject
QString mFamily;
- bool mSyncable;
KConfig *mConfig;
diff --git a/microkde/kresources/resource.cpp b/microkde/kresources/resource.cpp
index f79bcd0..cccd485 100644
--- a/microkde/kresources/resource.cpp
+++ b/microkde/kresources/resource.cpp
@@ -200,2 +200,3 @@ void Resource::dump() const
kdDebug(5650) << " ReadOnly: " << ( d->mReadOnly ? "yes" : "no" ) << endl;
+ kdDebug(5650) << " IncludeInSync: " << ( d->mIncludeInSync ? "yes" : "no" ) << endl;
kdDebug(5650) << " Active: " << ( d->mActive ? "yes" : "no" ) << endl;
diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h
index 70b5613..ed5af96 100644
--- a/microkde/kresources/resource.h
+++ b/microkde/kresources/resource.h
@@ -42,3 +42,2 @@ namespace KRES {
class ConfigWidget;
-class SyncWidgetContainer;
@@ -234,3 +233,3 @@ link_DATA= resourceexample.desktop
* A subclass should reimplement at least the constructor and the
- * @ref writeConfig method.
+k * @ref writeConfig method.
*
@@ -325,7 +324,2 @@ class Resource : public QObject
-
-
- virtual bool isSyncable() const = 0;
-
-
/**
@@ -378,3 +372,3 @@ class PluginFactoryBase : public KLibFactory
public:
- virtual Resource *resource( const KConfig *config, bool syncable ) = 0;
+ virtual Resource *resource( const KConfig *config) = 0;
@@ -382,4 +376,2 @@ class PluginFactoryBase : public KLibFactory
- virtual SyncWidgetContainer *syncWidgetContainer() = 0;
-
protected:
@@ -392,3 +384,3 @@ class PluginFactoryBase : public KLibFactory
-template<class TR,class TC, class TS>
+template<class TR,class TC>
class PluginFactory : public PluginFactoryBase
@@ -396,5 +388,5 @@ class PluginFactory : public PluginFactoryBase
public:
- Resource *resource( const KConfig *config, bool syncable )
+ Resource *resource( const KConfig *config)
{
- return new TR( config, syncable );
+ return new TR( config );
}
@@ -405,8 +397,2 @@ class PluginFactory : public PluginFactoryBase
}
-
- SyncWidgetContainer *syncWidgetContainer()
- {
- return new TS();
- }
-
};
diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro
index df914ce..071ceb3 100644
--- a/microkde/microkdeE.pro
+++ b/microkde/microkdeE.pro
@@ -91,3 +91,2 @@ osmartpointer.h \
kresources/kcmkresources.h \
- kresources/syncwidget.h \
kdecore/kmdcodec.h \
@@ -175,3 +174,2 @@ oprocess.cpp \
kresources/selectdialog.cpp \
- kresources/syncwidget.cpp \
kutils/kcmultidialog.cpp \