summaryrefslogtreecommitdiffstats
path: root/ext/gtk/test3.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gtk/test3.rb')
-rw-r--r--ext/gtk/test3.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/gtk/test3.rb b/ext/gtk/test3.rb
new file mode 100644
index 000000000..d73f72f9f
--- /dev/null
+++ b/ext/gtk/test3.rb
@@ -0,0 +1,16 @@
+require 'gtk'
+
+window = Gtk::FileSelection::new("file selection dialog")
+window.position(Gtk::WIN_POS_MOUSE)
+window.border_width(0)
+
+window.ok_button.signal_connect("clicked") do
+ print window.get_filename, "\n"
+end
+window.cancel_button.signal_connect("clicked") do
+ window.destroy
+ exit
+end
+window.show
+
+Gtk::main()