select_file (MainWindow)

          # File lib/json/editor.rb, line 1287
    1287:       def select_file(message)
    1288:         filename = nil
    1289:         fs = FileSelection.new(message)
    1290:         fs.set_modal(true)
    1291:         @default_dir = File.join(Dir.pwd, '') unless @default_dir
    1292:         fs.set_filename(@default_dir)
    1293:         fs.set_transient_for(self)
    1294:         fs.signal_connect(:destroy) { Gtk.main_quit }
    1295:         fs.ok_button.signal_connect(:clicked) do
    1296:           filename = fs.filename
    1297:           @default_dir = File.join(File.dirname(filename), '')
    1298:           fs.destroy
    1299:           Gtk.main_quit
    1300:         end
    1301:         fs.cancel_button.signal_connect(:clicked) do
    1302:           fs.destroy
    1303:           Gtk.main_quit
    1304:         end
    1305:         fs.show_all
    1306:         Gtk.main
    1307:         filename
    1308:       end