shows an asynchronous FileChooser window, yields the chosen filename TODO save last path
# File metasm/gui/gtk.rb, line 679 def initialize(owner, title, opts={}) owner ||= Gtk::Window.toplevels.first super(title, owner, Gtk::FileChooser::ACTION_SAVE, nil, [Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL], [Gtk::Stock::SAVE, Gtk::Dialog::RESPONSE_ACCEPT]) f = opts[:path] || @@currentfolder self.current_folder = f if f signal_connect('response') { |win, id| if id == Gtk::Dialog::RESPONSE_ACCEPT file = filename @@currentfolder = File.dirname(file) end destroy yield file if file true } show_all present end
# File metasm/gui/win32.rb, line 2465 def w32api(arg) Win32Gui.getsavefilenamea(arg) end
# File metasm/gui/win32.rb, line 2468 def w32flags Win32Gui::OFN_OVERWRITEPROMPT end