Sha256: 50f5668cc61fe7e5c53e4bbc0c614b7a2f9b683f43e3f555eb3c8236b74ceceb

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

#!/usr/bin/env ruby

=begin

action.rb

Luca Russo <vargolo@gmail.com>
Copyright (LGPL) 2006 - 2011

ruby-libnotify action example

=end

begin
  require 'RNotify'
rescue LoadError
  require 'rubygems'
  require 'RNotify'
end

Gtk.init
Notify.init("Test3")

test = Notify::Notification.new("Test 3", "action test", nil)
test.timeout= Notify::Notification::EXPIRES_NEVER
test.signal_connect("closed") { Gtk.main_quit }

test.add_action("Click Me action", "Click Me!", "bye!!") do |action, data|
  puts "#{action} - #{data}"
  Gtk.main_quit
end

test.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.5.0 examples/action.rb