Created
October 6, 2010 03:00
-
-
Save treed/612736 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gtk2' | |
dialog = Gtk::FileChooserDialog.new("Open File", | |
nil, | |
Gtk::FileChooser::ACTION_OPEN, | |
nil, | |
[Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL], | |
[Gtk::Stock::OPEN, Gtk::Dialog::RESPONSE_ACCEPT]) | |
dialog.select_multiple = true | |
if dialog.run == Gtk::Dialog::RESPONSE_ACCEPT | |
dialog.filenames.each do |name| puts name end | |
end | |
dialog.destroy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment