1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 Action = Struct.new(:id, :opts, :action)
11 def action(id, opts = {}, &action)
13 @action_data << Action.new(id, opts, action)
21 @action_data.each(&blk)
25 class ActionProviderClient < KDE::XMLGUIClient
28 def initialize(parent, provider)
32 setXMLFile(provider.xml_file)
33 provider.each_action do |action|
34 regular_action(action.id, action.opts) do
35 action.action[@parent]