diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/kjssupport/template | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/kjssupport/template')
-rw-r--r-- | languages/kjssupport/template/Makefile.am | 20 | ||||
-rw-r--r-- | languages/kjssupport/template/app.js | 18 | ||||
-rw-r--r-- | languages/kjssupport/template/app.kdevelop | 45 | ||||
-rw-r--r-- | languages/kjssupport/template/jshello | 6 | ||||
-rw-r--r-- | languages/kjssupport/template/script | 13 |
5 files changed, 102 insertions, 0 deletions
diff --git a/languages/kjssupport/template/Makefile.am b/languages/kjssupport/template/Makefile.am new file mode 100644 index 00000000..3244188a --- /dev/null +++ b/languages/kjssupport/template/Makefile.am @@ -0,0 +1,20 @@ +appwizarddatadir = ${kde_datadir}/kdevappwizard +commondatadir = ${appwizarddatadir}/template-common +jshellodir = ${appwizarddatadir}/template-jshello +templatedir = ${appwizarddatadir}/templates + +jshello_DATA = app.js app.kdevelop +template_DATA = jshello + +DISTCLEANFILES = script.local +EXTRA_DIST = script + +perl = perl + +script.local: ${srcdir}/script + cp ${srcdir}/script script.local ; \ + perl -npi -e 's%^#\!.*$$%#!'${perl}' -I'${commondatadir}'%g;' script.local + +install-data-local: script.local + $(mkinstalldirs) $(DESTDIR)$(jshellodir) + $(INSTALL_DATA) script.local $(DESTDIR)$(jshellodir)/script diff --git a/languages/kjssupport/template/app.js b/languages/kjssupport/template/app.js new file mode 100644 index 00000000..aa564dd6 --- /dev/null +++ b/languages/kjssupport/template/app.js @@ -0,0 +1,18 @@ +#!/usr/bin/env kjscmd + +// Create main view +var mw = new KMainWindow(); +var lv = new KListView( mw ); +mw.setCentralWidget(lv); + +lv.addColumn('One'); +lv.addColumn('Two'); +lv.addColumn('Three'); + +lv.insertItem( 'Something', "Nothing", "Thing" ); +lv.insertItem( 'Something', "Nothing", "Thing" ); +lv.insertItem( 'Something', "Nothing", "Thing" ); +lv.insertItem( 'Something', "Nothing", "Thing" ); + +mw.show(); + diff --git a/languages/kjssupport/template/app.kdevelop b/languages/kjssupport/template/app.kdevelop new file mode 100644 index 00000000..2bb39a0a --- /dev/null +++ b/languages/kjssupport/template/app.kdevelop @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<kdevelop> + <general> + <author>$AUTHOR$</author> + <email>$EMAIL$</email> + <version>$VERSION$</version> + <projectmanagement>KDevScriptProject</projectmanagement> + <primarylanguage>Javascript</primarylanguage> + <keywords> + <keyword>Javascript</keyword> + </keywords> + <ignoreparts> + <part>KDevFileView</part> + <part>KDevdistpart</part> + <part>KDevDebugger</part> + </ignoreparts> + </general> + <kdevscriptproject> + <general> + <activedir>src</activedir> + <includepatterns>*.js</includepatterns> + <excludepatterns>*~</excludepatterns> + </general> + </kdevscriptproject> + <kdevfileview> + <groups> + <group pattern="*.js" name="Scripts" /> + </groups> + </kdevfileview> + <kdevdoctreeview> + <ignoretocs> + <toc>kde</toc> + <toc>gtk</toc> + <toc>gnustep</toc> + <toc>python</toc> + <toc>perl</toc> + <toc>php</toc> + </ignoretocs> + </kdevdoctreeview> + <kdevfilecreate> + <useglobaltypes> + <type ext="js"/> + </useglobaltypes> + </kdevfilecreate> +</kdevelop> diff --git a/languages/kjssupport/template/jshello b/languages/kjssupport/template/jshello new file mode 100644 index 00000000..8013b033 --- /dev/null +++ b/languages/kjssupport/template/jshello @@ -0,0 +1,6 @@ +# KDE Config File +[General] +Name=Simple KJSEmbed Script +Category=Script +Comment=This generates a simplistic 'Hello world' program in KJSEmbed +FileTemplates=js,Javascript diff --git a/languages/kjssupport/template/script b/languages/kjssupport/template/script new file mode 100644 index 00000000..d3a808c5 --- /dev/null +++ b/languages/kjssupport/template/script @@ -0,0 +1,13 @@ +#!perl -I/usr/kde/3.1/share/apps/kdevappwizard/template-common + +use gideon; + +initGideon(); + +print "Installing project file\n"; +installHTML( "${src}/template-jshello/app.kdevelop", "${dest}/${APPNAMELC}.kdevelop" ); + +print "Installing application sources\n"; +install( "${src}/template-jshello/app.js", "${dest}/${APPNAMELC}.js" ); + +print "Finished\n"; |