metasploit-framework/lib/msf/ui/gtk2/dialog/error.rb

27 lines
630 B
Ruby
Raw Normal View History

module Msf
module Ui
module Gtk2
class MsfDialog
##
# Display an error Gtk style
# parent: the Gtk parent widget
# title: the error title
# message: the error
##
class Error < Msf::Ui::Gtk2::SkeletonAlert
def initialize(parent, title, message=nil)
super(parent, title, Gtk::Stock::DIALOG_ERROR,
[[Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK]],
message)
self.default_response = Gtk::Dialog::RESPONSE_OK
show_all and run
destroy
end
end
end
end
end
end