Sha256: 34594471e6f6f3bf6ed1b6e3e13ca8300a995dbaf08d197f0abdad81c97e519c

Contents?: true

Size: 1.23 KB

Versions: 108

Compression:

Stored size: 1.23 KB

Contents

#!/usr/bin/env ruby
=begin
  aboutdialog.rb - Ruby/GTK sample script.

  Copyright (c) 2005,2006 Ruby-GNOME2 Project Team 
  This program is licenced under the same licence as Ruby-GNOME2.

  $Id: aboutdialog.rb,v 1.2 2006/06/17 13:18:12 mutoh Exp $
=end
require 'gtk2'

if str = Gtk.check_version(2, 6, 0)
  puts "This sample requires GTK+ 2.6.0 or later"
  puts str
  exit
end

Gtk::AboutDialog.set_email_hook {|about, link|
  p "email_hook"
  p link
}
Gtk::AboutDialog.set_url_hook {|about, link|
  p "url_hook"
  p link
}

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) 2005 Ruby-GNOME2 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-GNOME2."
a.logo      = Gdk::Pixbuf.new("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   = "http://ruby-gnome2.sourceforge.jp"
a.website_label = "Ruby-GNOME2 Project Website"

p a.run

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
gtk2-3.0.8-x86-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.8-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.8 sample/misc/aboutdialog.rb
gtk2-3.0.7-x86-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.7-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.7 sample/misc/aboutdialog.rb
gtk2-3.0.6-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.6-x86-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.6 sample/misc/aboutdialog.rb
gtk2-3.0.5-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.5-x86-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.5 sample/misc/aboutdialog.rb
gtk2-3.0.4-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.4-x86-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.4 sample/misc/aboutdialog.rb
gtk2-3.0.3-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.3-x86-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.3 sample/misc/aboutdialog.rb
gtk2-3.0.2-x64-mingw32 sample/misc/aboutdialog.rb
gtk2-3.0.2-x86-mingw32 sample/misc/aboutdialog.rb