This repository has been archived on 2021-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
25 lines
469 B
Ruby
25 lines
469 B
Ruby
#!/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
|