summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kpartplugin
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/kpartplugin')
-rw-r--r--languages/cpp/app_templates/kpartplugin/.kdev_ignore0
-rw-r--r--languages/cpp/app_templates/kpartplugin/Makefile.am19
-rw-r--r--languages/cpp/app_templates/kpartplugin/hi16-action-plugin.pngbin0 -> 292 bytes
-rw-r--r--languages/cpp/app_templates/kpartplugin/hi22-action-plugin.pngbin0 -> 1151 bytes
-rw-r--r--languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate204
-rw-r--r--languages/cpp/app_templates/kpartplugin/kpartplugin.pngbin0 -> 16772 bytes
-rw-r--r--languages/cpp/app_templates/kpartplugin/plugin.kdevelop114
-rw-r--r--languages/cpp/app_templates/kpartplugin/plugin_app.cpp109
-rw-r--r--languages/cpp/app_templates/kpartplugin/plugin_app.h34
-rw-r--r--languages/cpp/app_templates/kpartplugin/plugin_app.rc11
-rw-r--r--languages/cpp/app_templates/kpartplugin/src-Makefile.am22
-rw-r--r--languages/cpp/app_templates/kpartplugin/subdirs3
12 files changed, 516 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kpartplugin/.kdev_ignore b/languages/cpp/app_templates/kpartplugin/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/.kdev_ignore
diff --git a/languages/cpp/app_templates/kpartplugin/Makefile.am b/languages/cpp/app_templates/kpartplugin/Makefile.am
new file mode 100644
index 00000000..170bdd6d
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/Makefile.am
@@ -0,0 +1,19 @@
+dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h \
+ plugin_app.rc hi16-action-plugin.png hi22-action-plugin.png \
+ kpartplugin.png plugin.kdevelop subdirs
+
+templateName = kpartplugin
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/cpp/app_templates/kpartplugin/hi16-action-plugin.png b/languages/cpp/app_templates/kpartplugin/hi16-action-plugin.png
new file mode 100644
index 00000000..e2d7bab8
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/hi16-action-plugin.png
Binary files differ
diff --git a/languages/cpp/app_templates/kpartplugin/hi22-action-plugin.png b/languages/cpp/app_templates/kpartplugin/hi22-action-plugin.png
new file mode 100644
index 00000000..4082bf10
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/hi22-action-plugin.png
Binary files differ
diff --git a/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate b/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate
new file mode 100644
index 00000000..f331c6cf
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate
@@ -0,0 +1,204 @@
+# KDE Config File
+[General]
+Name=KHTMLPart plugin
+Name[br]=Lugent KHTMLPart
+Name[ca]=Connector per a KHTMLPart
+Name[de]=KHTMLPart-Modul
+Name[el]=Πρόσθετο KHTMLPart
+Name[es]=Complemento para KHTMLPart
+Name[eu]=KHTMLPart plugina
+Name[fa]=وصلۀ KHTMLPart
+Name[fr]=Module externe pour le composant KHTML
+Name[ga]=Breiseán KHTMLPart
+Name[gl]=Extensión para KHTMLPart
+Name[hu]=KHTML-bővítőmodul
+Name[it]=Plugin KHTMLPart
+Name[ja]=KHTMLPart プラグイン
+Name[nds]=KHTMLPart-Moduul
+Name[ne]=KHTMLPart प्लगइन
+Name[nl]=KHTMLPart-plugin
+Name[pl]=Wtyczka do KHTMLPart
+Name[pt]='Plugin' do KHTMLPart
+Name[pt_BR]='Plugin' do KHTMLPart
+Name[ru]=Модуль KHTMLPart
+Name[sk]=KHTMLPart modul
+Name[sl]=Vstavek za KHTMLPart
+Name[sr]=Прикључак за део KHTML
+Name[sr@Latn]=Priključak za deo KHTML
+Name[sv]=Insticksprogram för KHTML-delprogram
+Name[tr]=KHTMLPart Eklentisi
+Name[zh_CN]=KHTMLPart 插件
+Name[zh_TW]=KHTMLPart 外掛程式
+Icon=kpartplugin.png
+Category=C++/KDE
+Comment=Generates a plugin for the KHTML part.
+Comment[ca]=Genera un connector per a la part KHTML.
+Comment[da]=Genererer et plugin for KHTML parten.
+Comment[de]=Erstellt ein Modul für die Komponente KHTML
+Comment[el]=Δημιουργεί ένα πρόσθετο για το τμήμα KHTML.
+Comment[es]=Genera un complemento para KHTMLPart.
+Comment[et]=KHTML-komponendi plugina loomine.
+Comment[eu]=KHTML zatirako plugin bat sortzen du.
+Comment[fa]=یک وصله برای جزء KHTML تولید می‌کند
+Comment[fr]=Génère un module externe pour le composant KHTML.
+Comment[gl]=Xera unha extensión para o 'part' KHTML.
+Comment[hu]=Létrehoz egy KHTML-bővítőmodult.
+Comment[it]=Genera un plugin per la part KHTML.
+Comment[ja]=KHTML パートのためのプラグインを作成します
+Comment[nds]=Stellt en Moduul för de Komponent KHTML op.
+Comment[ne]=KHTML भागका लागि प्लगइन उत्पन्न गर्दछ ।
+Comment[nl]=Genereert een plugin voor de KHTML-part.
+Comment[pl]=Generuje wtyczkę do KHTML part.
+Comment[pt]=Gera um 'plugin' para a componente KHTML.
+Comment[pt_BR]=Gera um 'plugin' para a componente KHTML.
+Comment[ru]=Создание модуля для компонента KHTML.
+Comment[sk]=Vygeneruje modul pre KHTML part.
+Comment[sr]=Прави прикључак за део KHTML.
+Comment[sr@Latn]=Pravi priključak za deo KHTML.
+Comment[sv]=Skapar ett insticksprogram för KHTML-delprogrammet
+Comment[zh_CN]=生成 KHTML 部件的插件。
+Comment[zh_TW]=產生一個 KHTML part 的外掛程式
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp
+Archive=kpartplugin.tar.gz
+
+[ADMIN]
+Type=include
+File=%{kdevelop}/template-common/admin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[MKDIR_DOCBOOK1]
+Type=mkdir
+Dir=%{dest}/doc
+
+[MKDIR_DOCBOOK2]
+Type=mkdir
+Dir=%{dest}/doc/en
+
+[FILE1]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-Makefile.am
+Dest=%{dest}/doc/Makefile.am
+
+[FILE2]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-en-Makefile.am
+Dest=%{dest}/doc/en/Makefile.am
+
+[FILE3]
+Type=install
+EscapeXML=true
+Source=%{kdevelop}/template-common/kde-index.docbook
+Dest=%{dest}/doc/en/index.docbook
+
+[FILE4]
+Type=install
+EscapeXML=true
+Source=%{src}/plugin.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[FILE5]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE6]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.am
+Dest=%{dest}/Makefile.am
+
+[FILE7]
+Type=install
+Source=%{kdevelop}/template-common/kde-configure.in.in
+Dest=%{dest}/configure.in.in
+
+[MkDir3]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE8]
+Type=install
+Source=%{kdevelop}/template-common/kde-app.lsm
+Dest=%{dest}/src/%{APPNAMELC}.lsm
+
+[MkDir4]
+Type=mkdir
+Dir=%{dest}/po
+
+[FILE9]
+Type=install
+Source=%{kdevelop}/template-common/kde-po-Makefile.am
+Dest=%{dest}/po/Makefile.am
+
+[FILE10]
+Type=install
+Source=%{src}/subdirs
+Dest=%{dest}/subdirs
+
+[FILE11]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE12]
+Type=install
+Source=%{src}/plugin_app.cpp
+Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp
+
+[FILE13]
+Type=install
+Source=%{src}/plugin_app.h
+Dest=%{dest}/src/plugin_%{APPNAMELC}.h
+
+[FILE14]
+Type=install
+EscapeXML=true
+Source=%{src}/plugin_app.rc
+Dest=%{dest}/src/plugin_%{APPNAMELC}.rc
+
+[FILE15]
+Type=install
+Source=%{src}/hi16-action-plugin.png
+Dest=%{dest}/src/hi16-action-plugin.png
+Process=false
+
+[FILE16]
+Type=install
+Source=%{src}/hi22-action-plugin.png
+Dest=%{dest}/src/hi32-action-plugin.png
+Process=false
+
+[MSG]
+Type=message
+Comment=A KHTMLPart plugin was created in %{dest}
+Comment[ca]=Un connector per a KHTMLPart ha estat creat en %{dest}
+Comment[da]=Et KHTMLPart plugin blev oprettet i %{dest}
+Comment[de]=Ein Modul für die Komponente KHTML wurde in %{dest} erstellt.
+Comment[el]=Ένα πρόσθετο τμήμα KHTML δημιουργήθηκε στο %{dest}
+Comment[es]=Un complemento para KHTMLPart ha sido creado en %{dest}
+Comment[et]=KHTMLPart plugin loodi asukohta %{dest}
+Comment[eu]=KHTMLPart plugin bat sortu da hemen: %{dest}
+Comment[fa]=یک وصلۀ جزء KHTML در %{dest} ایجاد شد
+Comment[fr]=Un module externe pour KHTMLPart a été créé dans %{dest}
+Comment[ga]=Cruthaíodh breiseán KHTMLPart i %{dest}
+Comment[gl]=Creouse unha extensión para KHTMLPart en %{dest}
+Comment[hu]=Létrejött egy KHTML-bővítőmodul itt: %{dest}
+Comment[it]=È stato creato un plugin KHTMLPart in %{dest}
+Comment[ja]=KHTMLPart プラグインを %{dest} に作成しました
+Comment[nds]=In %{dest} wöör en KHTMLPart-Moduul opstellt
+Comment[ne]=KHTMLPart प्लगइन %{dest} मा सिर्जना गरियो
+Comment[nl]=Een KHTMLPart-plugin is aangemaakt in %{dest}
+Comment[pl]=Wtyczka do KHTMLPart została utworzona w %{dest}
+Comment[pt]=Foi criado um 'plugin' KHTMLPart em %{dest}
+Comment[pt_BR]=Foi criado um 'plugin' KHTMLPart em %{dest}
+Comment[ru]=Модуль для компонента KHTML создан в %{dest}
+Comment[sk]=KHTML modul bol vytvorený v %{dest}
+Comment[sr]=Прикључак за део KHTML направљен је у %{dest}
+Comment[sr@Latn]=Priključak za deo KHTML napravljen je u %{dest}
+Comment[sv]=Ett insticksprogram för KHTML-delprogrammet skapades i %{dest}
+Comment[tr]=Bir KHTMLPart eklentisi %{dest} içinde yaratıldı.
+Comment[zh_CN]=在 %{dest} 中创建了一个 KHTMLPart 插件
+Comment[zh_TW]=一個 KHTML 外掛程式已建立於 %{dest}
diff --git a/languages/cpp/app_templates/kpartplugin/kpartplugin.png b/languages/cpp/app_templates/kpartplugin/kpartplugin.png
new file mode 100644
index 00000000..7d90241a
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/kpartplugin.png
Binary files differ
diff --git a/languages/cpp/app_templates/kpartplugin/plugin.kdevelop b/languages/cpp/app_templates/kpartplugin/plugin.kdevelop
new file mode 100644
index 00000000..dc1b3e25
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/plugin.kdevelop
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ </keywords>
+ </general>
+ <kdevcppsupport>
+ <qt>
+ <version>3</version>
+ <used>true</used>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ </qt>
+ </kdevcppsupport>
+
+<kdevautoproject>
+ <general>
+ <activetarget>src/lib%{APPNAMELC}.la</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ </debug>
+ </configurations>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ </groups>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>sw</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>w3c-svg</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ </general>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/languages/cpp/app_templates/kpartplugin/plugin_app.cpp b/languages/cpp/app_templates/kpartplugin/plugin_app.cpp
new file mode 100644
index 00000000..a9ee55a3
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/plugin_app.cpp
@@ -0,0 +1,109 @@
+
+#include "plugin_%{APPNAMELC}.h"
+
+#include <khtml_part.h>
+#include <kaction.h>
+#include <kinstance.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kglobal.h>
+
+Plugin%{APPNAME}::Plugin%{APPNAME}( QObject* parent, const char* name )
+ : Plugin( parent, name )
+{
+ // Instantiate all of your actions here. These will appear in
+ // Konqueror's menu and toolbars.
+ (void) new KAction( i18n("&Plugin Action"), "%{APPNAMELC}", 0,
+ this, SLOT(slotAction()),
+ actionCollection(), "plugin_action" );
+}
+
+Plugin%{APPNAME}::~Plugin%{APPNAME}()
+{
+}
+
+void Plugin%{APPNAME}::slotAction()
+{
+ // This plugin assumes KHTMLPart. If your plugin can handle more
+ // than this or a different Part than this, simply delete or
+ // change the following block.
+ if ( !parent()->inherits("KHTMLPart") )
+ {
+ QString title( i18n( "Cannot Translate Source" ) );
+ QString text( i18n( "You cannot translate anything except web pages "
+ "with this plugin." ) );
+
+ KMessageBox::sorry( 0, text, title );
+ return;
+ }
+
+ // Get a handle on our parent so we may get the necessary data for
+ // processing
+ KHTMLPart *part = dynamic_cast<KHTMLPart *>(parent());
+
+ // This plugin only uses the URL. You may use whatever data you
+ // need.
+ KURL url( part->url() );
+
+ // This is a standard check to make sure we are dealing with a
+ // valid URL
+ if ( !url.isValid() )
+ {
+ QString title( i18n( "Malformed URL" ) );
+ QString text( i18n( "The URL you entered is not valid, please "
+ "correct it and try again" ) );
+
+ KMessageBox::sorry( 0, text, title );
+ return;
+ }
+
+// The following block is very plugin specific. In this example, we
+// translate the current page with AltaVista's BabelFish. You will
+// definitely want to change this.
+// BEGIN
+ KURL work( "http://babel.altavista.com/translate.dyn" );
+
+ QString query( "urltext=" );
+ query += KURL::encode_string( url.url() );
+ work.setQuery( query );
+// END
+
+ // Finally, execute the request
+ part->openURL( work );
+}
+
+%{APPNAME}Factory::%{APPNAME}Factory()
+ : KLibFactory()
+{
+}
+
+%{APPNAME}Factory::~%{APPNAME}Factory()
+{
+ delete s_instance;
+ s_instance = 0;
+}
+
+QObject* %{APPNAME}Factory::createObject( QObject* parent, const char* name, const char*, const QStringList & )
+{
+ return new Plugin%{APPNAME}( parent, name );
+}
+
+KInstance *%{APPNAME}Factory::instance()
+{
+ if ( !s_instance )
+ s_instance = new KInstance( "%{APPNAMELC}" );
+ return s_instance;
+}
+
+extern "C"
+{
+ void* init_lib%{APPNAMELC}plugin()
+ {
+ KGlobal::locale()->insertCatalogue("%{APPNAMELC}");
+ return new %{APPNAME}Factory;
+ }
+}
+
+KInstance* %{APPNAME}Factory::s_instance = 0L;
+
+#include "plugin_%{APPNAMELC}.moc"
diff --git a/languages/cpp/app_templates/kpartplugin/plugin_app.h b/languages/cpp/app_templates/kpartplugin/plugin_app.h
new file mode 100644
index 00000000..e70ad1c1
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/plugin_app.h
@@ -0,0 +1,34 @@
+
+#ifndef _PLUGIN_%{APPNAMEUC}_H_
+#define _PLUGIN_%{APPNAMEUC}_H_
+
+#include <kparts/plugin.h>
+#include <kparts/factory.h>
+
+class Plugin%{APPNAME} : public KParts::Plugin
+{
+ Q_OBJECT
+public:
+ Plugin%{APPNAME}( QObject* parent = 0, const char* name = 0 );
+ virtual ~Plugin%{APPNAME}();
+
+public slots:
+ void slotAction();
+};
+
+class %{APPNAME}Factory : public KLibFactory
+{
+ Q_OBJECT
+public:
+ %{APPNAME}Factory();
+ virtual ~%{APPNAME}Factory();
+
+ virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, const char* name = "QObject", const QStringList &args = QStringList() );
+
+ static KInstance* instance();
+
+private:
+ static KInstance* s_instance;
+};
+
+#endif // _PLUGIN_%{APPNAMEUC}_H_
diff --git a/languages/cpp/app_templates/kpartplugin/plugin_app.rc b/languages/cpp/app_templates/kpartplugin/plugin_app.rc
new file mode 100644
index 00000000..a38ee14e
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/plugin_app.rc
@@ -0,0 +1,11 @@
+<!DOCTYPE kpartgui>
+<kpartplugin name="%{APPNAMELC}" library="lib%{APPNAMELC}plugin" version="1">
+<MenuBar>
+ <Menu name="tools"><Text>&amp;Tools</Text>
+ <Action name="plugin_action"/>
+ </Menu>
+</MenuBar>
+<ToolBar name="extraToolBar">
+ <Action name="plugin_action"/>
+</ToolBar>
+</kpartplugin>
diff --git a/languages/cpp/app_templates/kpartplugin/src-Makefile.am b/languages/cpp/app_templates/kpartplugin/src-Makefile.am
new file mode 100644
index 00000000..52e29c09
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/src-Makefile.am
@@ -0,0 +1,22 @@
+INCLUDES = $(all_includes)
+METASOURCES = AUTO
+
+KDE_ICON = AUTO
+
+# Install this plugin in the KDE modules directory
+kde_module_LTLIBRARIES = lib%{APPNAMELC}plugin.la
+
+# This is all standard. Remove the LIB_KHTML reference if you are not
+# using the KHTML Part
+lib%{APPNAMELC}plugin_la_SOURCES = plugin_%{APPNAMELC}.cpp
+lib%{APPNAMELC}plugin_la_LIBADD = $(LIB_KPARTS) $(LIB_KHTML)
+lib%{APPNAMELC}plugin_la_LDFLAGS = -module -avoid-version -no-undefined $(KDE_PLUGIN) $(all_libraries)
+
+# Install the .rc file in the Part's directory (in this case, the part
+# is KHTMLPart)
+pluginsdir = $(kde_datadir)/khtml/kpartplugins
+plugins_DATA = plugin_%{APPNAMELC}.rc
+
+messages: rc.cpp
+ $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot
diff --git a/languages/cpp/app_templates/kpartplugin/subdirs b/languages/cpp/app_templates/kpartplugin/subdirs
new file mode 100644
index 00000000..0e678106
--- /dev/null
+++ b/languages/cpp/app_templates/kpartplugin/subdirs
@@ -0,0 +1,3 @@
+doc
+po
+src