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)
17 @action_data.each(&blk)
21 class ActionProviderClient < KDE::XMLGUIClient
24 def initialize(parent, provider)
29 provider.each_action do |action|
30 regular_action(action.id, action.opts) do
31 action.action[@parent]