Sha256: 20f6ac9d238886fd4e377c8c6c8014e9eb45e070e38772f6ee5228f2ba5fcdca
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
#!/usr/bin/env ruby =begin attach_to.rb Luca Russo <vargolo@gmail.com> Copyright (LGPL) 2006 - 2010 ruby-libnotify attach_to example =end begin require 'RNotify' rescue LoadError require 'rubygems' require 'RNotify' end Gtk.init Notify.init("Test9") win = Gtk::Window.new(Gtk::Window::TOPLEVEL) win.signal_connect("destroy") { Gtk.main_quit } bt = Gtk::Button.new("Click Me!") win.add(bt) win.show_all test = Notify::Notification.new("Attach_To", "Do you savvy? :P", nil, nil) test.attach_to(bt) test.timeout= Notify::Notification::EXPIRES_NEVER test.add_action("Attach_To", "Click Me!") { Gtk.main_quit } bt.signal_connect("clicked", test) { |wid,data| data.show } Gtk.main test.clear_actions test.close Notify.uninit
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-libnotify-0.4.1 | examples/attach_to.rb |