Wincent Colaiuta [Wed, 24 Jun 2009 16:14:27 +0000 (18:14 +0200)]
Replace WOPublic symlink with a submodule
Given that login-tool is soon to be released as an open source product I
don't want possible future refactorings in WOPublic to break its
buildability.
Use a Git submodule to peg WOPublic to a specific commit inside the
login-tool root directory.
The cost is that in order to propagate WOPublic updates I'll have to
explicitly update the submodule, but the corresponding benefit is that
unexpected updates can never occur (and never break a previously working
build).
Another benefit is that developers can clone the login-tool superproject
and automatically pull down one of its dependencies without having to
worry about performing multiple clones and ensuring that the project
folders are in the correct relative locations.
In a future commit will look at making a similar change to the Wincent
Build Tools (currently referenced via relative path).
Wincent Colaiuta [Wed, 24 Jun 2009 15:52:46 +0000 (17:52 +0200)]
Replace (unwritted) man page with (empty) README
I don't really have any intention of whipping up a man page for this
tool right now, so dump the old file which was never used anyway in
favour of a simple README (content forthcoming).
Wincent Colaiuta [Mon, 22 Jun 2009 20:22:06 +0000 (22:22 +0200)]
Remove unused SystemEvents header
This is a remnant from a previous iteration of development, when the
Scripting Bridge was used. With the move to the Launch Services API this
is no longer required.
Wincent Colaiuta [Mon, 10 Dec 2007 10:55:30 +0000 (11:55 +0100)]
Accept multiple add and remove arguments
Remove the limitation on the number of add and remove arguments that
are accepted by the tool (previously only the last argument was used
and previous arguments were silently discarded).
Wincent Colaiuta [Sun, 9 Dec 2007 17:39:58 +0000 (18:39 +0100)]
Use WOLoginManager API from WOCommon
Apple has a new API for managing login items in Leopard, so
I'm writing an Object-Oriented wrapper for it and sticking it
inside WOCommon. This commit is the first of an incremental
transition to the WOCommon API; the first function to be
converted is for the "list" command.
Wincent Colaiuta [Fri, 7 Dec 2007 15:52:04 +0000 (16:52 +0100)]
Add alternate methods for adding login items
It appears that System Events is broken on Leopard: telling it to add a
new login item fails in all three ways that I tried to do so (using the
scripting bridge, using raw Apple Events, and even trying from the
Script Editor using the script that Apple itself documents as being the
way to do it).
So this commit preprocesses the non-working solutions away and falls
back to old-fashioned direct manipulation of the loginwindow.plist. This
actually is supported by Apple and is listed in their docs as one of the
ways of adding login items.
Wincent Colaiuta [Wed, 5 Dec 2007 11:23:53 +0000 (12:23 +0100)]
More efficient property iteration
Rather than getting properties on each login item one by one (each
property requiring an Apple Event round-trip) use the "properties"
method in conjunction with the arrayByApplyingSelector: method to
slurp down all the properties in a single transaction.
Wincent Colaiuta [Wed, 5 Dec 2007 10:56:52 +0000 (11:56 +0100)]
Add System Events target and header
The target consists of a shell script that updates the scripting bridge
header for the System Events application. A copy of the header itself
(as generated on 10.5.1) is included with this commit.
Wincent Colaiuta [Wed, 5 Dec 2007 10:41:42 +0000 (11:41 +0100)]
Use shared configuration from buildtools
Note that at the same time upgraded the project bundle format to the
latest version; this causes Xcode to create an "index" directory in
the source root, so I added a top-level .gitignore file at the same
time to ignore that.
Wincent Colaiuta [Wed, 5 Dec 2007 10:15:02 +0000 (11:15 +0100)]
Modernization and clean-up
Various clean-ups which don't alter the compiled code but improve the
source:
- change date format in header for consistency with other projects
- remove Subversion buzz
- update and normalize copyright
- rewrap to 132-columns for better readability
- improve alignment for better readability
- use C99 for loops
- whitespace fixes (trailing whitespace, missing newline at end of file)
- use EXIT_SUCCESS rather than 0