Sha256: 5ceea2ea214eebf2e7fe5ca48047c9a0faa342b1a3c8e62708062ab09d57709c

Contents?: true

Size: 478 Bytes

Versions: 35

Compression:

Stored size: 478 Bytes

Contents

#!/usr/bin/env ruby

require 'gtk2'

label=Gtk::Label.new.show

info = Gtk::InfoBar.new
info.no_show_all = true
info.content_area.add(label)
info.add_button(Gtk::Stock::OK, Gtk::ResponseType::OK)
info.signal_connect('response'){|info, response| info.hide}

w = Gtk::Window.new
w.add(info)
w.show_all
w.signal_connect(:delete_event){ Gtk.main_quit }

GLib::Timeout.add_seconds(1){
  label.text = 'ERROR'
  info.message_type=Gtk::MessageType::ERROR
  info.show
  false
}
Gtk.main

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
gtk2-3.4.3 sample/misc/infobar.rb
gtk2-3.4.2 sample/misc/infobar.rb
gtk2-3.4.1 sample/misc/infobar.rb
gtk2-3.4.0 sample/misc/infobar.rb
gtk2-3.3.9 sample/misc/infobar.rb
gtk2-3.3.8 sample/misc/infobar.rb
gtk2-3.3.7 sample/misc/infobar.rb
gtk2-3.3.6 sample/misc/infobar.rb
gtk2-3.3.5 sample/misc/infobar.rb
gtk2-3.3.4 sample/misc/infobar.rb
gtk2-3.3.3 sample/misc/infobar.rb
gtk2-3.3.2 sample/misc/infobar.rb
gtk2-3.3.1 sample/misc/infobar.rb
gtk2-3.3.0 sample/misc/infobar.rb
gtk2-3.2.9-x64-mingw32 sample/misc/infobar.rb
gtk2-3.2.9-x86-mingw32 sample/misc/infobar.rb
gtk2-3.2.9 sample/misc/infobar.rb
gtk2-3.2.8-x64-mingw32 sample/misc/infobar.rb
gtk2-3.2.8-x86-mingw32 sample/misc/infobar.rb
gtk2-3.2.8 sample/misc/infobar.rb