Updated CHANGELOG.
[kaya.git] / examples / helloworld / hello_world.rb
blobaf0e4bfd96fc6657e906feffe297bde808438d2c
1 require 'plugins/plugin'
3 class HelloWorldPlugin
4   include Plugin
5   include ActionProvider
7   plugin :name => 'Hello World',
8          :interface => :action_provider
10   def initialize
11     action(:hello_world,
12            :text => KDE.i18n('Say &Hello World')) do |parent|
13       parent.console.append("Hello world")
14     end
15   end
17   def gui
18     KDE::gui(:hello_world) do |g|
19       g.menubar do |mb|
20         mb.menu(:gameMenu) do |m|
21           m.action :hello_world
22         end
23       end
24     end
25   end
26 end