Ruby/GTK3 - AboutDialog

`gem install gtk3`

# AboutDialog

* https://github.com/ruby-gnome/ruby-gnome/blob/master/gtk3/sample/misc/aboutdialog.rb

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/18167468-ecb3-fd94-1f7c-b55cb7af76da.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/de8ceab0-a8ff-b067-a115-bbc36a3073e2.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e21c5572-1a32-5029-2a1c-8a2bbc53e0bf.png)

```ruby
require 'gtk3'

unless Gtk::Version.or_later?(3, 4, 2)
  puts "This sample requires GTK+ 3.4.2 or later: #{Gtk::Version::STRING}"
  exit
end

a = Gtk::AboutDialog.new
a.artists            = ['Artist 1 <no1@foo.bar.com>', 'Artist 2 <no2@foo.bar.com>']
a.authors            = ['Author 1 <no1@foo.bar.com>', 'Author 2 <no2@foo.bar.com>']
a.comments           = 'This is a sample script for Gtk::AboutDialog'
a.copyright          = 'Copyright (C) 2020 Ruby-GNOME Project'
a.documenters        = ['Documenter 1 <no1@foo.bar.com>', 'Documenter 2 <no2@foo.bar.com>']
a.license            = 'This program is licenced under the same licence as Ruby-GNOME.'
a.logo               = GdkPixbuf::Pixbuf.new(file: File.join(__dir__, 'gnome-logo-icon.png'))
a.program_name       = 'Gtk::AboutDialog sample'
a.translator_credits = "Translator 1\nTranslator 2\n"
a.version            = '1.0.0'
a.website            = 'https://ruby-gnome2.osdn.jp'
a.website_label      = 'Ruby-GNOME Project Website'

a.signal_connect('activate-link') do |_widget, uri|
  p _widget.class
  p uri
end

p a.run

```

* https://github.com/ruby-gnome/ruby-gnome/blob/master/gtk3/sample/misc/aboutdialog2.rb

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3c5c964c-6a15-b9fb-5aff-af3de56b385a.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cb6dc3d0-abd9-f2ca-4b4e-fc7673b8cf16.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c8874c9a-3888-a09a-81f1-7a72cbed220f.png)

```ruby
#!/usr/bin/env ruby
# frozen_string_literal: true

#   aboutdialog2.rb - Ruby/GTK sample script.
#
#   Copyright (c) 2005-2020 Ruby-GNOME Project Team
#   This program is licenced under the same licence as Ruby-GNOME.
require 'gtk3'

unless Gtk::Version.or_later?(3, 4, 2)
  puts "This sample requires GTK+ 3.4.2 or later: #{Gtk::Version::STRING}"
  exit
end

about_dialog = Gtk::AboutDialog.show(
  nil,
  'artists' => ['Artist 1 <no1@foo.bar.com>', 'Artist 2 <no2@foo.bar.com>'],
  'authors' => ['Author 1 <no1@foo.bar.com>', 'Author 2 <no2@foo.bar.com>'],
  'comments' => 'This is a sample script for Gtk::AboutDialog',
  'copyright' => 'Copyright (C) 2005-2020 Ruby-GNOME Project',
  'documenters' => ['Documenter 1 <no1@foo.bar.com>', 'Documenter 2 <no2@foo.bar.com>'],
  'license' => 'This program is licenced under the same licence as Ruby-GNOME.',
  'logo_icon_name' => 'gtk-home',
  'program_name' => 'Gtk::AboutDialog sample',
  'translator_credits' => "Translator 1 <no1@foo.bar.com>\nTranslator 2 <no2@foo.bar.com>\n",
  'version' => '1.0.0',
  'website' => 'https://ruby-gnome2.osdn.jp',
  'website_label' => 'Ruby-GNOME Project Website'
)

about_dialog.signal_connect('delete_event') do
  Gtk.main_quit
end

Gtk.main

```