Sha256: cdf784d87b3b3d6fb8a86a2f97a712a55396f0fc56cba840091796dfbb23f192

Contents?: true

Size: 635 Bytes

Versions: 184

Compression:

Stored size: 635 Bytes

Contents

#!/usr/bin/env ruby
=begin
  fileselection.rb - Ruby/GTK2 sample script.

  Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: fileselection.rb,v 1.10 2006/06/17 13:18:12 mutoh Exp $
=end

require 'gtk2'

puts "Deprecated. Use Gtk::FileChooserDialog instead."

window = Gtk::FileSelection.new("file selection dialog")
window.window_position = Gtk::Window::POS_MOUSE
window.border_width = 0

ret = window.run
if ret == Gtk::Dialog::RESPONSE_OK
  puts "OK"
  puts window.filename
elsif ret == Gtk::Dialog::RESPONSE_CANCEL
  puts "CANCEL"
  puts window.filename
end

Version data entries

184 entries across 184 versions & 1 rubygems

Version Path
gtk2-3.2.7-x86-mingw32 sample/misc/fileselection.rb
gtk2-3.2.7-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.7 sample/misc/fileselection.rb
gtk2-3.2.6-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.6-x86-mingw32 sample/misc/fileselection.rb
gtk2-3.2.6 sample/misc/fileselection.rb
gtk2-3.2.5-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.5-x86-mingw32 sample/misc/fileselection.rb
gtk2-3.2.5 sample/misc/fileselection.rb
gtk2-3.2.4-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.4-x86-mingw32 sample/misc/fileselection.rb
gtk2-3.2.4 sample/misc/fileselection.rb
gtk2-3.2.3-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.3-x86-mingw32 sample/misc/fileselection.rb
gtk2-3.2.3 sample/misc/fileselection.rb
gtk2-3.2.2-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.2-x86-mingw32 sample/misc/fileselection.rb
gtk2-3.2.2 sample/misc/fileselection.rb
gtk2-3.2.1-x64-mingw32 sample/misc/fileselection.rb
gtk2-3.2.1-x86-mingw32 sample/misc/fileselection.rb