From a6d58bb6052ac8cb01805a48c4ad2f129126116f Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 24 Feb 2010 02:13:59 +0000 Subject: Added KDE3 version of kvirc git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- doc/scriptexamples/runmenu/Makefile.am | 5 ++ doc/scriptexamples/runmenu/runmenu.kvs | 111 +++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 doc/scriptexamples/runmenu/Makefile.am create mode 100644 doc/scriptexamples/runmenu/runmenu.kvs (limited to 'doc/scriptexamples/runmenu') diff --git a/doc/scriptexamples/runmenu/Makefile.am b/doc/scriptexamples/runmenu/Makefile.am new file mode 100644 index 0000000..d91889e --- /dev/null +++ b/doc/scriptexamples/runmenu/Makefile.am @@ -0,0 +1,5 @@ +############################################################################### +# KVirc IRC client Makefile - 16.12.98 Szymon Stefanek +############################################################################### + +EXTRA_DIST = runmenu.kvs diff --git a/doc/scriptexamples/runmenu/runmenu.kvs b/doc/scriptexamples/runmenu/runmenu.kvs new file mode 100644 index 0000000..dea6a27 --- /dev/null +++ b/doc/scriptexamples/runmenu/runmenu.kvs @@ -0,0 +1,111 @@ +# This simple script adds a sample "run external program" popup +# to your menubar +# This is just a sample popup... you will probably +# want to add/remove entries here +# This will also work mainly on unix... windows has not so much +# proggies to be run as example + + +# Define the popup with run entries... +# You prolly will change a lot here :) + +defpopup(runmenu) +{ + popup(Terminal,138) + { + item(XTerm,25) ($system.ostype == unix) + { + run xterm + } + + item(Konsole,151) ($system.ostype == unix) + { + run konsole + } + + item(ETerm,25) ($system.ostype == unix) + { + run eterm + } + } + + popup(Browser,172) + { + item(konqueror,135) ($system.ostype == unix) + { + run konqueror + } + + item(netscape,164) + { + if($system.ostype == unix)run kvi_run_netscape + else run netscape.exe + } + } + + popup(Multimedia,177) + { + item(xmms) + { + run xmms + } + item(mplayer) + { + run mplayer + } + item(kscd) + { + run kscd + } + } + + popup(Utils) + { + item(xcalc) + { + run xcalc; + } + item(kcalc) + { + run kcalc; + } + } + + separator; + + # Let's allow to run an user specified command + + item(Run...,183) + { + dialog.textinput(Run,
Please enter the command name
,Ok,Cancel) + { + if($0 == 0 && $1)run $1 + } + } + + separator; + + # This is an interesting item + # It allows this script to be uninstalled :) + + popup(Uninstall,110) + { + item(Uninstall this menu,110) + { + timer -s (runmenu_uninstall,0){ defpopup(runmenu){}; } + } + } +} + +# add it to the menubar of each new frame + +event(OnFrameWindowCreated,runmenu) +{ + setmenu -i=3 "&Run" runmenu +} + +# set it also just now, in the current frame + +setmenu -i=3 "&Run" runmenu + +# done :) -- cgit v1.2.3