Staging
v0.8.1
v0.8.1
Revision 1521fdae594d87cfc724711aef1a50aa555947d2 authored by Kurt B. Kaiser on 06 May 2009, 03:38:31 UTC, committed by Kurt B. Kaiser on 06 May 2009, 03:38:31 UTC
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72226 | kurt.kaiser | 2009-05-02 21:03:44 -0400 (Sat, 02 May 2009) | 3 lines idle.py modified and simplified to better support developing experimental versions of IDLE which are not installed in the standard location. ........
1 parent cef4b81
seticon.m
/*
* Simple tool for setting an icon on a file.
*/
#import <Cocoa/Cocoa.h>
#include <stdio.h>
int main(int argc, char** argv)
{
if (argc != 3) {
fprintf(stderr, "Usage: seticon ICON TARGET");
return 1;
}
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSString* iconPath = [NSString stringWithUTF8String:argv[1]];
NSString* filePath = [NSString stringWithUTF8String:argv[2]];
[NSApplication sharedApplication];
[[NSWorkspace sharedWorkspace]
setIcon: [[NSImage alloc] initWithContentsOfFile: iconPath]
forFile: filePath
options: 0];
[pool release];
return 0;
}
Computing file changes ...