mirror of
https://github.com/munki/munki.git
synced 2026-05-08 05:19:31 -05:00
Added MunkiStatus.xcodeproject to build MunkiStatus.app.
Added munkistatus.py to communicate with MunkiStstus.app Modified ManagedInstaller and removepackages to use MunkStatus.app for user feedback instead of iHook. Removed iHook example files (100.mangagedinstalllogout.hook anbd MI_logout.hook) since we no longer use iHook for user feedback. git-svn-id: http://munki.googlecode.com/svn/trunk@44 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Executable
+56
@@ -0,0 +1,56 @@
|
||||
-- MunkiStatus.applescript
|
||||
-- MunkiStatus
|
||||
|
||||
-- Created by Greg Neagle on 4/17/09.
|
||||
|
||||
--
|
||||
-- Copyright 2009 Greg Neagle.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
|
||||
on clicked theObject
|
||||
if the name of theObject is "stopBtn" then
|
||||
set the state of theObject to 1
|
||||
set enabled of theObject to false
|
||||
end if
|
||||
end clicked
|
||||
|
||||
--#define kCGNormalWindowLevel 0
|
||||
--#define kCGStatusWindowLevel 25
|
||||
--#define kCGScreenSaverWindowLevel 1000
|
||||
|
||||
property kCGNormalWindowLevel : 0
|
||||
property kCGStatusWindowLevel : 25
|
||||
property kCGScreenSaverWindowLevel : 1000
|
||||
|
||||
on awake from nib theObject
|
||||
if name of theObject is "mainWindow" then
|
||||
-- Leopard is picky about what we can display over the loginwindow
|
||||
call method "setCanBecomeVisibleWithoutLogin:" of theObject with parameter 1
|
||||
|
||||
--if we are in the loginwindow context, we need to set the window level so
|
||||
--we'll show above the loginwindow
|
||||
set myScript to "/usr/bin/who | /usr/bin/grep console"
|
||||
try
|
||||
copy (do shell script myScript) to result
|
||||
on error
|
||||
--grep throws an error if no match
|
||||
--no-one is logged in. We must be at the loginwindow.
|
||||
call method "setLevel:" of theObject with parameter (kCGScreenSaverWindowLevel - 1)
|
||||
end try
|
||||
|
||||
set visible of theObject to true
|
||||
activate
|
||||
end if
|
||||
end awake from nib
|
||||
Reference in New Issue
Block a user