Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F16570479
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/kontact/plugins/knode/Makefile.am b/kontact/plugins/knode/Makefile.am
index 18787e1302..2b9d5d3711 100644
--- a/kontact/plugins/knode/Makefile.am
+++ b/kontact/plugins/knode/Makefile.am
@@ -1,14 +1,14 @@
INCLUDES = -I$(top_srcdir)/kontact/interfaces -I$(top_srcdir)/knode $(all_includes)
kde_module_LTLIBRARIES = libkontact_knodeplugin.la
libkontact_knodeplugin_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
libkontact_knodeplugin_la_LIBADD = $(top_builddir)/kontact/interfaces/libkpinterfaces.la $(LIB_KPARTS)
-libkontact_knodeplugin_la_SOURCES = knode_plugin.cpp
+libkontact_knodeplugin_la_SOURCES = knode_plugin.cpp knodeiface.stub
METASOURCES = AUTO
servicedir = $(kde_servicesdir)/kontact
service_DATA = knodeplugin.desktop
-knodeIface_DIR = $(top_srcdir)/knode
+knodeiface_DIR = $(top_srcdir)/knode
diff --git a/kontact/plugins/knode/knode_plugin.cpp b/kontact/plugins/knode/knode_plugin.cpp
index 54a98f6d32..e7d914d86c 100644
--- a/kontact/plugins/knode/knode_plugin.cpp
+++ b/kontact/plugins/knode/knode_plugin.cpp
@@ -1,81 +1,95 @@
/*
This file is part of Kontact.
Copyright (c) 2003 Zack Rusin
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include "knode_plugin.h"
#include "core.h"
#include <kapplication.h>
#include <kparts/componentfactory.h>
#include <kgenericfactory.h>
#include <kapplication.h>
#include <kaction.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <dcopclient.h>
#include <qwidget.h>
typedef KGenericFactory<KNodePlugin, Kontact::Core> KNodePluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_knodeplugin,
KNodePluginFactory( "kontact_knodeplugin" ) )
KNodePlugin::KNodePlugin( Kontact::Core *core, const char *, const QStringList& )
- : Kontact::Plugin( core, core, "knode" )
+ : Kontact::Plugin( core, core, "knode" ), mStub(0)
{
setInstance( KNodePluginFactory::instance() );
-}
+ insertNewAction( new KAction( i18n( "New Article" ), BarIcon( "mail_new" ),
+ 0, this, SLOT( slotPostArticle() ), actionCollection(), "post_article" ) );
+}
KNodePlugin::~KNodePlugin()
{
}
bool KNodePlugin::createDCOPInterface( const QString& /*serviceType*/ )
{
return false;
}
bool KNodePlugin::isRunningStandalone()
{
DCOPClient *dc = kapp->dcopClient();
return (dc->isApplicationRegistered("knode")) &&
(!dc->remoteObjects("knode").contains("KNodeIface"));
}
QStringList KNodePlugin::invisibleToolbarActions() const
{
return QStringList( "article_postNew" );
}
+void KNodePlugin::slotPostArticle()
+{
+ (void) part(); // ensure part is loaded
+ Q_ASSERT( mStub );
+ if ( mStub )
+ mStub->postArticle();
+}
+
KParts::Part* KNodePlugin::createPart()
{
- return loadPart();
+ KParts::Part *part = loadPart();
+ if ( !part ) return 0;
+
+ mStub = new KNodeIface_stub( dcopClient(), "knode", "KNodeIface" );
+ return part;
}
#include "knode_plugin.moc"
diff --git a/kontact/plugins/knode/knode_plugin.h b/kontact/plugins/knode/knode_plugin.h
index 26f392cf19..9a777b32c3 100644
--- a/kontact/plugins/knode/knode_plugin.h
+++ b/kontact/plugins/knode/knode_plugin.h
@@ -1,49 +1,56 @@
/*
This file is part of Kontact.
Copyright (c) 2003 Zack Rusin
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KNODE_PLUGIN_H
#define KNODE_PLUGIN_H
#include <klocale.h>
#include <kparts/part.h>
+#include "knodeiface_stub.h"
#include "plugin.h"
class KNodePlugin : public Kontact::Plugin
{
Q_OBJECT
public:
KNodePlugin( Kontact::Core *core, const char *name, const QStringList& );
~KNodePlugin();
virtual bool createDCOPInterface( const QString& serviceType );
virtual bool isRunningStandalone();
virtual QStringList invisibleToolbarActions() const;
protected:
virtual KParts::Part* createPart();
+
+ protected slots:
+ void slotPostArticle();
+
+ private:
+ KNodeIface_stub *mStub;
};
#endif
diff --git a/kontact/plugins/knode/knodeplugin.desktop b/kontact/plugins/knode/knodeplugin.desktop
index b922704724..f18e827738 100644
--- a/kontact/plugins/knode/knodeplugin.desktop
+++ b/kontact/plugins/knode/knodeplugin.desktop
@@ -1,66 +1,66 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
Icon=knode
ServiceTypes=Kontact/Plugin,KPluginInfo
X-KDE-Library=libkontact_knodeplugin
X-KDE-KontactPluginVersion=2
X-KDE-KontactPartLibraryName=libknodepart
X-KDE-KontactPartExecutableName=knode
X-KDE-PluginInfo-Name=kontact_knodeplugin
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
Comment=Kontact KNode Plugin
Comment[be]=Дапаўненьне Кантакту "KNode"
Comment[bg]=Приставка за четене на новини
Comment[ca]=Connector Kontact per a KNode
Comment[cs]=Modul KNode pro aplikaci Kontact
Comment[da]=Kontact KNode-plugin
Comment[de]=KNode-Plugin für Kontact
Comment[el]=Πρόσθετο KNode του Kontact
Comment[es]=Accesorio KNode para Kontact
Comment[et]=Kontacti KNode plugin
Comment[fi]=Kontactin KNode-liitännäinen
Comment[fr]=Module KNode pour Kontact
Comment[hu]=Kontact KNode-bővítőmodul
Comment[it]=Plugin Knode Kontact
Comment[nl]=Kontact KNode-plugin
Comment[nn]=Kontact, KNode-programtillegg
Comment[pt]='Plugin' do KNode para o Kontact
Comment[pt_BR]=Plug-in para Knode do Kontact
Comment[ru]=Модуль Kontact для доступа к KNode
Comment[sr]=Додатак Kontact-а за KNode
Comment[sv]=Kontact insticksdelprogram för Knode
Comment[tr]=Kontact KNode Eklentisi
Comment[uk]=Втулок новин (KNode) Kontact
Comment[xx]=xxKontact KNode Pluginxx
Comment[zh_CN]=Kontact KNode 插件
-Name=News
+Name=Newsgroups
Name[be]=Навіны
Name[ca]=Notícies
Name[cs]=Novinky
Name[da]=Nyheder
Name[el]=Νέα
Name[es]=Noticias
Name[et]=Uudised
Name[fi]=Uutiset
Name[fr]=Nouvelles
Name[hu]=Hírek
Name[it]=Notizie
Name[nl]=Nieuws
Name[nn]=Nyheiter
Name[pt]=Notícias
Name[pt_BR]=Notícias
Name[ru]=Новости
Name[sl]=Novice
Name[sr]=Вести
Name[sv]=Nyheter
Name[tr]=Haberler
Name[uk]=Новини
Name[uz]=Янгиликлар
Name[xx]=xxNewsxx
Name[zh_CN]=新闻
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 1, 9:22 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10075782
Default Alt Text
(7 KB)
Attached To
Mode
rKP kdepim
Attached
Detach File
Event Timeline
Log In to Comment