276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
# File 'lib/ax/application.rb', line 276
def perform name
case name
when :terminate
return true if terminated?
@app.terminate; spin 0.25; terminated?
when :force_terminate
return true if terminated?
@app.forceTerminate; spin 0.25; terminated?
when :hide
return true if hidden?
@app.hide; spin 0.25; hidden?
when :unhide
return true if active?
@app.activateWithOptions(NSRunningApplication::NSApplicationActivateIgnoringOtherApps)
spin 0.25; active?
else
super
end
end
|