Diff
Modified: MacRuby/trunk/sample-macruby/Scripts/growl/growl.rb (627 => 628)
--- MacRuby/trunk/sample-macruby/Scripts/growl/growl.rb 2008-09-27 00:35:05 UTC (rev 627)
+++ MacRuby/trunk/sample-macruby/Scripts/growl/growl.rb 2008-09-27 00:41:51 UTC (rev 628)
@@ -1,7 +1,7 @@
framework 'Cocoa'
module Growl
- class Notifier < NSObject
+ class Notifier
VERSION = '1.0.1'
GROWL_IS_READY = "Lend Me Some Sugar; I Am Your Neighbor!"
Modified: MacRuby/trunk/sample-macruby/Scripts/growl/growl_block_sample.rb (627 => 628)
--- MacRuby/trunk/sample-macruby/Scripts/growl/growl_block_sample.rb 2008-09-27 00:35:05 UTC (rev 627)
+++ MacRuby/trunk/sample-macruby/Scripts/growl/growl_block_sample.rb 2008-09-27 00:41:51 UTC (rev 628)
@@ -1,6 +1,6 @@
require 'growl_helpers'
-class GrowlController < NSObject
+class GrowlController
# Makes the #growl and #sticky_growl shortcut methods available.
include Growl
Modified: MacRuby/trunk/sample-macruby/Scripts/growl/growl_delegate_sample.rb (627 => 628)
--- MacRuby/trunk/sample-macruby/Scripts/growl/growl_delegate_sample.rb 2008-09-27 00:35:05 UTC (rev 627)
+++ MacRuby/trunk/sample-macruby/Scripts/growl/growl_delegate_sample.rb 2008-09-27 00:41:51 UTC (rev 628)
@@ -1,6 +1,6 @@
require 'growl'
-class GrowlController < NSObject
+class GrowlController
HELLO_TYPE = 'Hello message received'
def init
Modified: MacRuby/trunk/sample-macruby/Scripts/growl/hotcocoa_growl.rb (627 => 628)
--- MacRuby/trunk/sample-macruby/Scripts/growl/hotcocoa_growl.rb 2008-09-27 00:35:05 UTC (rev 627)
+++ MacRuby/trunk/sample-macruby/Scripts/growl/hotcocoa_growl.rb 2008-09-27 00:41:51 UTC (rev 628)
@@ -1,6 +1,6 @@
require 'hotcocoa'
-class Growl < NSObject
+class Growl
include HotCocoa
GROWL_IS_READY = "Lend Me Some Sugar; I Am Your Neighbor!"
@@ -46,7 +46,7 @@
private
def pid
- NSProcessInfo.processInfo.processIdentifier.to_i
+ NSProcessInfo.processInfo.processIdentifier
end
def register_to_growl!
@@ -56,10 +56,12 @@
on_notification(:distributed => true, :named => "#{@app_name}-#{pid}-#{GROWL_NOTIFICATION_CLICKED}") do |n|
puts '@@@ on clicked'
+ puts n.userInfo[:ClickedContext][:user_click_context]
end
on_notification(:distributed => true, :named => "#{@app_name}-#{pid}-#{GROWL_NOTIFICATION_TIMED_OUT}") do |n|
puts '@@@ on timed out'
+ puts n.userInfo[:ClickedContext][:user_click_context]
end
dic = {
Modified: MacRuby/trunk/sample-macruby/Scripts/growl/hotcocoa_sample.rb (627 => 628)
--- MacRuby/trunk/sample-macruby/Scripts/growl/hotcocoa_sample.rb 2008-09-27 00:35:05 UTC (rev 627)
+++ MacRuby/trunk/sample-macruby/Scripts/growl/hotcocoa_sample.rb 2008-09-27 00:41:51 UTC (rev 628)
@@ -1,6 +1,6 @@
require 'hotcocoa_growl'
-class GrowlController < NSObject
+class GrowlController
HELLO_TYPE = 'Hello message received'
def init