2007-05-18 22:37:27 +00:00
|
|
|
module Msf
|
|
|
|
module Ui
|
|
|
|
module Gtk2
|
2007-05-18 23:51:10 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Implement a basic window
|
|
|
|
#
|
2007-05-18 22:37:27 +00:00
|
|
|
class SkeletonBasic < Gtk::Window
|
|
|
|
def initialize(title = nil)
|
|
|
|
super(Gtk::Window::TOPLEVEL)
|
2007-05-18 23:51:10 +00:00
|
|
|
set_title("#{title}")
|
2007-05-18 22:37:27 +00:00
|
|
|
|
|
|
|
signal_connect("key_press_event") do |widget, event|
|
|
|
|
if event.state.control_mask? and event.keyval == Gdk::Keyval::GDK_q
|
|
|
|
destroy
|
|
|
|
true
|
|
|
|
else
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
signal_connect("delete_event") do |widget, event|
|
2007-05-18 23:51:10 +00:00
|
|
|
destroy
|
|
|
|
true
|
2007-05-18 22:37:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|