Method: Gtk::FileChooserDialog#initialize

Defined in:
lib/gtk3/file-chooser-dialog.rb

#initialize(options = {}) ⇒ FileChooserDialog

Returns a new instance of FileChooserDialog.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/gtk3/file-chooser-dialog.rb', line 20

def initialize(options={})
  GLib::Object.instance_method(:initialize).bind(self).call
  Loader.reference_gobject(self, :sink => true)

  title = options[:title]
  parent = options[:parent]
  action = options[:action] || :open
  buttons = options[:buttons]

  set_title(title) if title
  set_action(action) if action
  set_transient_for(parent) if parent

  add_buttons(*buttons) if buttons
end