Sha256: f258e399ae40728595609a3d59947bf549f1a4b942e117555a04987f8806e168
Contents?: true
Size: 1.46 KB
Versions: 3
Compression:
Stored size: 1.46 KB
Contents
# Copyright (c) 2023 M.J.N. Corino, The Netherlands # # This software is released under the MIT license. # # Some parts are # Copyright 2004-2007, wxRuby development team # released under the MIT-like wxRuby2 license # Tweaks to the global module functions module Wx class << self # Allow this to be called with keyword parameters, and avoid # segfaults on OS X with bad params wx_about_box = self.instance_method(:about_box) define_method(:about_box) do | info, parent=nil | case info when Wx::AboutDialogInfo ab_info = info when Hash ab_info = Wx::AboutDialogInfo.new ab_info.name = info[:name] || 'wxRuby application' ab_info.version = info[:version] if info[:version] ab_info.description = info[:description] || '' ab_info.copyright = info[:copyright] || '' ab_info.licence = info[:licence] || '' ab_info.developers = info[:developers] || [] ab_info.doc_writers = info[:doc_writers] || [] ab_info.artists = info[:artists] || [] ab_info.translators = info[:translators] || [] if info.key?(:website) ab_info.set_web_site(*info[:website]) end if info.key?(:icon) ab_info.icon = info[:icon] end else Kernel.raise ArgumentError, "Can't use #{info.inspect} for AboutDialogInfo" end wx_about_box.bind(self).call(ab_info, parent) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wxruby3-1.3.1 | lib/wx/core/functions.rb |
wxruby3-1.3.0 | lib/wx/core/functions.rb |
wxruby3-1.2.1 | lib/wx/core/functions.rb |