select_file (MainWindow)

          # File lib/json/editor.rb, line 1296
    1296:       def select_file(message)
    1297:         filename = nil
    1298:         fs = FileSelection.new(message)
    1299:         fs.set_modal(true)
    1300:         @default_dir = File.join(Dir.pwd, '') unless @default_dir
    1301:         fs.set_filename(@default_dir)
    1302:         fs.set_transient_for(self)
    1303:         fs.signal_connect(:destroy) { Gtk.main_quit }
    1304:         fs.ok_button.signal_connect(:clicked) do
    1305:           filename = fs.filename
    1306:           @default_dir = File.join(File.dirname(filename), '')
    1307:           fs.destroy
    1308:           Gtk.main_quit
    1309:         end
    1310:         fs.cancel_button.signal_connect(:clicked) do
    1311:           fs.destroy
    1312:           Gtk.main_quit
    1313:         end
    1314:         fs.show_all
    1315:         Gtk.main
    1316:         filename
    1317:       end