Sha256: be0cb3095a282118d551999527a30395af42489a4698e253426d0091c29af218

Contents?: true

Size: 1.28 KB

Versions: 184

Compression:

Stored size: 1.28 KB

Contents

# Copyright (C) 2015  Ruby-GNOME2 Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module Gtk
  class FileChooserDialog
    alias_method :initialize_raw, :initialize
    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
  end
end

Version data entries

184 entries across 176 versions & 3 rubygems

Version Path
gtk3-3.2.3 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.2-x64-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.2-x86-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.2 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.1-x64-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.1-x86-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.1 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.0-x86-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.0-x64-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.2.0 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.9-x64-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.9-x86-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.9 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.8-x64-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.8-x86-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.8 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.7-x64-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.7-x86-mingw32 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.7 lib/gtk3/file-chooser-dialog.rb
gtk3-3.1.6-x64-mingw32 lib/gtk3/file-chooser-dialog.rb