Created
October 6, 2010 03:00
Revisions
-
treed revised this gist
Oct 6, 2010 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,8 @@ [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 -
treed created this gist
Oct 6, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ 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]) if dialog.run == Gtk::Dialog::RESPONSE_ACCEPT puts dialog.filename end dialog.destroy