Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'gtk2'
- include Gtk
- class GLib::Object
- signal_new('my_super_action',
- GLib::Signal::RUN_FIRST,
- nil,
- GLib::Type['void'])
- def signal_do_my_super_action
- end
- end
- class GeneralWindow < Window
- def initialize(*args)
- super
- signal_connect("delete_event"){Gtk.main_quit}
- add ToolsPanel.new
- signal_connect('my_super_action'){puts "aaa"}
- end
- end
- class ToolsPanel < Toolbar
- def initialize(*args)
- super
- append("but"){signal_emit('my_super_action')}
- end
- end
- GeneralWindow.new.show_all
- Gtk.main
Add Comment
Please, Sign In to add comment