Method: VMAgui#remove_extra_controllers
- Defined in:
- lib/vimamsa/gui.rb
#remove_extra_controllers ⇒ Object
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/vimamsa/gui.rb', line 515 def remove_extra_controllers clist = vma.gui.window.observe_controllers to_remove = [] (0..(clist.n_items - 1)).each { |x| ctr = clist.get_item(x) if ctr.class == Gtk::EventControllerKey and ctr != @press to_remove << ctr end } if to_remove.size > 0 # puts "Removing controllers:" # pp to_remove to_remove.each { |x| vma.gui.window.remove_controller(x) } end end |