Class: KDE::ActionCollection
Instance Method Summary collapse
Instance Method Details
#[]=(name, action) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/rui/toolkits/kde/kde.rb', line 82 def []=(name, action) unless action.is_a? KDE::Action orig_action = action action = KDE::Action.new(action.text, action.parent) action.icon = orig_action.icon action.checkable = orig_action.checkable action.checked = orig_action.checked action.on(:triggered) { orig_action.trigger } orig_action.on(:changed) { action.checked = orig_action.checked } end add_action(name.to_s, action) end |