Sha256: 5845c5f8d7cb23bc354337315dd1ab0fecc049adda7e6b1c6ceb4b932c131658

Contents?: true

Size: 482 Bytes

Versions: 14

Compression:

Stored size: 482 Bytes

Contents

#!/usr/bin/ruby
# hellgtk.rb - sample for Ruby/GTK
#
# Copyright (C) 2001-2004 Masao Mutoh
# This file is distributed under the same license as Ruby-GetText-Package.

require 'gettext'
require 'gtk'

include GetText
bindtextdomain("hellogtk", "locale") 

class LocalizedWindow < Gtk::Window
  def initialize
    super
    signal_connect('delete-event') do
      Gtk.main_quit
    end

    add(Gtk::Label.new(_("hello, gtk world")))
  end
end

LocalizedWindow.new.show_all

Gtk.main

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gettext-1.5.0-mswin32 samples/hellogtk.rb
gettext-1.4.0-mswin32 samples/hellogtk.rb
gettext-1.3.0-mswin32 samples/hellogtk.rb
gettext-1.2.0-mswin32 samples/hellogtk.rb
gettext-1.1.1-mswin32 samples/hellogtk.rb
gettext-1.1.0-mswin32 samples/hellogtk.rb
gettext-1.0.0-mswin32 samples/hellogtk.rb
gettext-1.0.0 samples/hellogtk.rb
gettext-1.2.0 samples/hellogtk.rb
gettext-1.1.0 samples/hellogtk.rb
gettext-1.1.1 samples/hellogtk.rb
gettext-1.5.0 samples/hellogtk.rb
gettext-1.4.0 samples/hellogtk.rb
gettext-1.3.0 samples/hellogtk.rb