Handle situations were ruby-gtk2 is available, but cairo is not. Fixes #191
git-svn-id: file:///home/svn/framework3/trunk@5407 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
d8d9db3299
commit
cd5d111296
|
@ -256,6 +256,8 @@ module Msf
|
||||||
da = Gtk::DrawingArea.new
|
da = Gtk::DrawingArea.new
|
||||||
da.set_size_request(600, 60)
|
da.set_size_request(600, 60)
|
||||||
|
|
||||||
|
if(da.window.respond_to?('create_cairo_context'))
|
||||||
|
|
||||||
Signal
|
Signal
|
||||||
da.signal_connect('expose-event') do |widget, event|
|
da.signal_connect('expose-event') do |widget, event|
|
||||||
cr = widget.window.create_cairo_context
|
cr = widget.window.create_cairo_context
|
||||||
|
@ -269,8 +271,10 @@ module Msf
|
||||||
|
|
||||||
cr.paint
|
cr.paint
|
||||||
end
|
end
|
||||||
|
else
|
||||||
# da = Gtk::Image.new(driver.get_image("banner_assistant.png"))
|
# Ugly, but better than a crash
|
||||||
|
da = Gtk::Image.new(driver.get_image("banner_assistant.png"))
|
||||||
|
end
|
||||||
|
|
||||||
return da
|
return da
|
||||||
end
|
end
|
||||||
|
|
3
msfgui
3
msfgui
|
@ -16,7 +16,8 @@ begin
|
||||||
require 'gtk2'
|
require 'gtk2'
|
||||||
require 'libglade2'
|
require 'libglade2'
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
$stderr.puts "[*] The msfgui interface requires the ruby-gtk2 and ruby-libglade2 package"
|
$stderr.puts "[*] The msfgui interface requires the ruby-gtk2 and ruby-libglade2 packages"
|
||||||
|
$stderr.puts "[*] Dependencies include ruby-pango, ruby-glib2, ruby-gdkpixbuf2, and ruby-atk"
|
||||||
exit(0)
|
exit(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue