|
|
@ -44,14 +44,13 @@
|
|
|
|
#include "akregator_plugin.h"
|
|
|
|
#include "akregator_plugin.h"
|
|
|
|
namespace Akregator {
|
|
|
|
namespace Akregator {
|
|
|
|
|
|
|
|
|
|
|
|
typedef KGenericFactory<Akregator::Plugin, Kontact::Core > PluginFactory;
|
|
|
|
typedef KGenericFactory<Akregator::AkregatorPlugin, Kontact::Core > PluginFactory;
|
|
|
|
K_EXPORT_COMPONENT_FACTORY( libkontact_akregator,
|
|
|
|
K_EXPORT_COMPONENT_FACTORY( libkontact_akregator,
|
|
|
|
PluginFactory( "kontact_akregator" ) )
|
|
|
|
PluginFactory( "kontact_akregator" ) )
|
|
|
|
|
|
|
|
|
|
|
|
Plugin::Plugin( Kontact::Core *core, const char *, const TQStringList& )
|
|
|
|
AkregatorPlugin::AkregatorPlugin( Kontact::Core *core, const char *, const TQStringList& )
|
|
|
|
: Kontact::Plugin( core, TQT_TQOBJECT(core), "akregator" ), m_stub(0)
|
|
|
|
: Kontact::Plugin( core, TQT_TQOBJECT(core), "akregator" ), m_stub(0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
setInstance( PluginFactory::instance() );
|
|
|
|
setInstance( PluginFactory::instance() );
|
|
|
|
|
|
|
|
|
|
|
|
insertNewAction( new TDEAction( i18n( "New Feed..." ), "bookmark_add", CTRL+SHIFT+Key_F, this, TQT_SLOT( addFeed() ), actionCollection(), "feed_new" ) );
|
|
|
|
insertNewAction( new TDEAction( i18n( "New Feed..." ), "bookmark_add", CTRL+SHIFT+Key_F, this, TQT_SLOT( addFeed() ), actionCollection(), "feed_new" ) );
|
|
|
@ -60,22 +59,22 @@ Plugin::Plugin( Kontact::Core *core, const char *, const TQStringList& )
|
|
|
|
new Kontact::UniqueAppHandlerFactory<Akregator::UniqueAppHandler>(), this );
|
|
|
|
new Kontact::UniqueAppHandlerFactory<Akregator::UniqueAppHandler>(), this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Plugin::~Plugin()
|
|
|
|
AkregatorPlugin::~AkregatorPlugin()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool Plugin::isRunningStandalone()
|
|
|
|
bool AkregatorPlugin::isRunningStandalone()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return m_uniqueAppWatcher->isRunningStandalone();
|
|
|
|
return m_uniqueAppWatcher->isRunningStandalone();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList Plugin::invisibleToolbarActions() const
|
|
|
|
TQStringList AkregatorPlugin::invisibleToolbarActions() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return TQStringList( "file_new_contact" );
|
|
|
|
return TQStringList( "file_new_contact" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Akregator::AkregatorPartIface_stub *Plugin::interface()
|
|
|
|
Akregator::AkregatorPartIface_stub *AkregatorPlugin::interface()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( !m_stub ) {
|
|
|
|
if ( !m_stub ) {
|
|
|
|
part();
|
|
|
|
part();
|
|
|
@ -86,7 +85,7 @@ Akregator::AkregatorPartIface_stub *Plugin::interface()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MyBasePart* Plugin::createPart()
|
|
|
|
MyBasePart* AkregatorPlugin::createPart()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MyBasePart* p = loadPart();
|
|
|
|
MyBasePart* p = loadPart();
|
|
|
|
|
|
|
|
|
|
|
@ -98,24 +97,24 @@ MyBasePart* Plugin::createPart()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Plugin::showPart()
|
|
|
|
void AkregatorPlugin::showPart()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
core()->selectPlugin(this);
|
|
|
|
core()->selectPlugin(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Plugin::addFeed()
|
|
|
|
void AkregatorPlugin::addFeed()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
interface()->addFeed();
|
|
|
|
interface()->addFeed();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList Plugin::configModules() const
|
|
|
|
TQStringList AkregatorPlugin::configModules() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQStringList modules;
|
|
|
|
TQStringList modules;
|
|
|
|
modules << "PIM/akregator.desktop";
|
|
|
|
modules << "PIM/akregator.desktop";
|
|
|
|
return modules;
|
|
|
|
return modules;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Plugin::readProperties( TDEConfig *config )
|
|
|
|
void AkregatorPlugin::readProperties( TDEConfig *config )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( part() ) {
|
|
|
|
if ( part() ) {
|
|
|
|
Akregator::Part *myPart = static_cast<Akregator::Part*>( part() );
|
|
|
|
Akregator::Part *myPart = static_cast<Akregator::Part*>( part() );
|
|
|
@ -123,7 +122,7 @@ void Plugin::readProperties( TDEConfig *config )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Plugin::saveProperties( TDEConfig *config )
|
|
|
|
void AkregatorPlugin::saveProperties( TDEConfig *config )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( part() ) {
|
|
|
|
if ( part() ) {
|
|
|
|
Akregator::Part *myPart = static_cast<Akregator::Part*>( part() );
|
|
|
|
Akregator::Part *myPart = static_cast<Akregator::Part*>( part() );
|
|
|
|