[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/akregator/onlinesync/akregator
From: Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date: 2008-03-01 21:14:42
Message-ID: 1204406082.613128.4524.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 781016 by osterfeld:
empty plugin with KCM for online reader support, and necessary changes in Akregator \
core
M +2 -0 interfaces/plugin.h
M +1 -0 plugins/CMakeLists.txt
M +1 -1 plugins/mk4storage/akregator_mk4storage_plugin.desktop
A plugins/onlinesync (directory)
A plugins/onlinesync/CMakeLists.txt
A plugins/onlinesync/akregator_config_onlinesync.cpp [License: GPL \
(v2+) (+Qt exception)] A \
plugins/onlinesync/akregator_config_onlinesync.desktop A \
plugins/onlinesync/akregator_config_onlinesync.h [License: GPL (v2+) (+Qt \
exception)] A plugins/onlinesync/akregator_onlinesync_plugin.desktop
A plugins/onlinesync/akregator_onlinesync_plugin.rc
A plugins/onlinesync/onlinesyncplugin.cpp [License: GPL (v2+) (+Qt \
exception)] A plugins/onlinesync/onlinesyncplugin.h [License: GPL \
(v2+) (+Qt exception)] A plugins/onlinesync/onlinesyncsettings.kcfg
A plugins/onlinesync/onlinesyncsettings.kcfgc
A plugins/onlinesync/settings_onlinesync.ui
M +18 -24 src/akregator_part.cpp
M +2 -3 src/akregator_part.h
M +2 -0 src/mainwindow.cpp
M +1 -1 src/pluginmanager.cpp
M +0 -2 src/pluginmanager.h
--- branches/work/akregator/onlinesync/akregator/interfaces/plugin.h #781015:781016
@@ -6,6 +6,8 @@
#include "akregator_export.h"
+#define AKREGATOR_PLUGIN_INTERFACE_VERSION 2
+
#define AKREGATOR_EXPORT_PLUGIN( classname ) \
extern "C" { \
KDE_EXPORT Akregator::Plugin* create_plugin() { return new classname; } \
--- branches/work/akregator/onlinesync/akregator/plugins/CMakeLists.txt \
#781015:781016 @@ -1,2 +1,3 @@
add_subdirectory( mk4storage )
+add_subdirectory( onlinesync )
--- branches/work/akregator/onlinesync/akregator/plugins/mk4storage/akregator_mk4storage_plugin.desktop \
#781015:781016 @@ -105,5 +105,5 @@
X-KDE-akregator-email=osterfeld@kde.org
X-KDE-akregator-rank=255
X-KDE-akregator-version=1
-X-KDE-akregator-framework-version=1
+X-KDE-akregator-framework-version=2
--- branches/work/akregator/onlinesync/akregator/src/akregator_part.cpp \
#781015:781016 @@ -50,14 +50,14 @@
#include <kfiledialog.h>
#include <kglobalsettings.h>
#include <kmessagebox.h>
-#include <KCMultiDialog>
-
#include <kstandarddirs.h>
#include <ktemporaryfile.h>
#include <kservice.h>
#include <kxmlguifactory.h>
#include <kio/netaccess.h>
-#include <kparts/genericfactory.h>
+#include <KParts/GenericFactory>
+#include <KParts/Plugin>
+#include <KSettings/Dialog>
#include <QFile>
#include <QObject>
@@ -95,7 +95,9 @@
, m_storage(0)
{
- // we need an instance
+ setPluginLoadingMode( LoadPluginsIfEnabled );
+ setPluginInterfaceVersion( AKREGATOR_PLUGIN_INTERFACE_VERSION );
+
setComponentData( AkregatorFactory::componentData() );
new PartAdaptor( this );
@@ -108,12 +110,12 @@
Backend::StorageFactoryDummyImpl* dummyFactory = new \
Backend::StorageFactoryDummyImpl();
Backend::StorageFactoryRegistry::self()->registerFactory(dummyFactory, \
dummyFactory->key());
- loadPlugins(); // FIXME: also unload them!
+ loadStoragePlugins(); // FIXME: also unload them!
m_storage = 0;
- Backend::StorageFactory* factory = \
Backend::StorageFactoryRegistry::self()->getFactory(Settings::archiveBackend());
- if (factory != 0)
- m_storage = factory->createStorage(QStringList());
+ Backend::StorageFactory* storageFactory = \
Backend::StorageFactoryRegistry::self()->getFactory(Settings::archiveBackend()); + \
if (storageFactory != 0) + m_storage = \
storageFactory->createStorage(QStringList());
if (!m_storage) // Houston, we have a problem
{
@@ -165,7 +167,7 @@
connect(kapp, SIGNAL(aboutToQuit()), this, SLOT(slotOnShutdown()));
- m_autosaveTimer = new QTimer(this);
+ m_autosaveTimer = new QTimer(this);
connect(m_autosaveTimer, SIGNAL(timeout()), this, SLOT(slotSaveFeedList()));
m_autosaveTimer->start(5*60*1000); // 5 minutes
@@ -178,15 +180,13 @@
if( !Settings::customUserAgent().isEmpty() )
useragent = Settings::customUserAgent();
- Syndication::FileRetriever::setUserAgent( useragent );
+ Syndication::FileRetriever::setUserAgent( useragent );
}
-void Part::loadPlugins()
+void Part::loadStoragePlugins()
{
- // "[X-KDE-akregator-plugintype] == 'storage'"
- KService::List offers = PluginManager::query();
-
- for( KService::List::ConstIterator it = offers.begin(), end = offers.end(); it \
!= end; ++it ) + KService::List offers = PluginManager::query( \
"[X-KDE-akregator-plugintype] == 'storage'" ); + for ( \
KService::List::ConstIterator it = offers.begin(), end = offers.end(); it != end; \
++it ) {
Akregator::Plugin* plugin = PluginManager::createFromService(*it);
if (plugin)
@@ -632,20 +632,14 @@
{
saveSettings();
- QPointer<KCMultiDialog> dlg( new KCMultiDialog( m_mainWidget ) );
+ QStringList parts;
+ parts.append( componentData().componentName() );
+ QPointer<KSettings::Dialog> dlg( new KSettings::Dialog( parts, m_mainWidget ) );
dlg->setModal( true );
connect( dlg, SIGNAL( configCommitted() ),
this, SLOT( slotSettingsChanged() ) );
-
connect( dlg, SIGNAL( configCommitted() ),
TrayIcon::getInstance(), SLOT( settingsChanged() ) );
-
- dlg->addModule( "akregator_config_general.desktop" );
- dlg->addModule( "akregator_config_appearance.desktop" );
- dlg->addModule( "akregator_config_archive.desktop" );
- dlg->addModule( "akregator_config_browser.desktop" );
- dlg->addModule( "akregator_config_advanced.desktop" );
-
dlg->exec();
delete dlg;
}
--- branches/work/akregator/onlinesync/akregator/src/akregator_part.h #781015:781016
@@ -33,7 +33,6 @@
class KAboutData;
class KConfigGroup;
class KUrl;
-class KParts::BrowserExtension;
class QDomDocument;
class QTimer;
@@ -152,8 +151,8 @@
/** @return Whether the tray icon is enabled or not */
bool isTrayIconEnabled() const;
- /** loads all Akregator plugins */
- void loadPlugins();
+ /** loads all Akregator storage plugins */
+ void loadStoragePlugins();
/** This must be implemented by each part */
bool openFile();
--- branches/work/akregator/onlinesync/akregator/src/mainwindow.cpp #781015:781016
@@ -68,6 +68,8 @@
MainWindow::MainWindow()
: KParts::MainWindow()
{
+ setPluginLoadingMode( DoNotLoadPlugins );
+
// set the shell's ui resource file
setObjectName("akregator_mainwindow");
setXMLFile("akregator_shell.rc");
--- branches/work/akregator/onlinesync/akregator/src/pluginmanager.cpp #781015:781016
@@ -44,7 +44,7 @@
// Add versioning constraint
QString
str = "[X-KDE-akregator-framework-version] == ";
- str += QString::number( FrameworkVersion );
+ str += QString::number( AKREGATOR_PLUGIN_INTERFACE_VERSION );
str += " and ";
if (!constraint.trimmed().isEmpty())
str += constraint + " and ";
--- branches/work/akregator/onlinesync/akregator/src/pluginmanager.h #781015:781016
@@ -30,8 +30,6 @@
class AKREGATORPART_EXPORT PluginManager
{
public:
- /** Bump this number whenever the plugin framework gets incompatible with \
older versions */
- static const int FrameworkVersion = 1;
/**
* It will return a list of services that match your
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic