├── README
├── OnAppBehaviour
├── OnAppBehaviour
│ ├── OnAppBehaviourHelper.app
│ │ └── Contents
│ │ │ ├── PkgInfo
│ │ │ ├── Resources
│ │ │ ├── Icon.icns
│ │ │ ├── MainMenu.nib
│ │ │ ├── en.lproj
│ │ │ │ └── InfoPlist.strings
│ │ │ └── ru.lproj
│ │ │ │ └── InfoPlist.strings
│ │ │ ├── MacOS
│ │ │ └── OnAppBehaviourHelper
│ │ │ └── Info.plist
│ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ └── Localizable.strings
│ ├── ru.lproj
│ │ ├── InfoPlist.strings
│ │ └── Localizable.strings
│ ├── Add.png
│ ├── Icon.png
│ ├── Remove.png
│ ├── OnAppBehaviour-Prefix.pch
│ ├── PopUpCell.h
│ ├── LoginItems.h
│ ├── PopUpButton.h
│ ├── AppCell.h
│ ├── PopUpButton.m
│ ├── PopUpCell.m
│ ├── OnAppBehaviour-Info.plist
│ ├── OnAppBehaviour.h
│ ├── LoginItems.m
│ ├── AppCell.m
│ ├── OnAppBehaviour.m
│ └── OnAppBehaviour.xib
└── OnAppBehaviour.xcodeproj
│ ├── xcuserdata
│ └── yuri.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── OnAppBehaviour.xcscheme
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ └── project.pbxproj
└── OnAppBehaviourHelper
├── OnAppBehaviourHelper
├── Icon.icns
├── en.lproj
│ └── InfoPlist.strings
├── ru.lproj
│ └── InfoPlist.strings
├── OnAppBehaviourHelper-Prefix.pch
├── main.m
├── OnAppBehaviourHelperAppDelegate.h
├── OnAppBehaviourHelper-Info.plist
├── OnAppBehaviourHelperAppDelegate.m
└── MainMenu.xib
└── OnAppBehaviourHelper.xcodeproj
├── project.xcworkspace
└── contents.xcworkspacedata
├── xcuserdata
└── yuri.xcuserdatad
│ └── xcschemes
│ ├── xcschememanagement.plist
│ └── OnAppBehaviourHelper.xcscheme
└── project.pbxproj
/README:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/PkgInfo:
--------------------------------------------------------------------------------
1 | APPLYYYY
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | "CFBundleName" = "Execute Me";
2 | "NSPrefPaneIconLabel" = "Execute\nMe";
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/ru.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | "CFBundleName" = "Выполни меня";
2 | "NSPrefPaneIconLabel" = "Выполни\nменя";
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/Add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/Add.png
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/Icon.png
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/Remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/Remove.png
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/Icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviourHelper/OnAppBehaviourHelper/Icon.icns
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | CFBundleName = "Execute Me (Helper)";
2 | CFBundleDisplayName = "Execute Me (Helper)";
3 |
4 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/ru.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | CFBundleName = "Выполни меня (помощник)";
2 | CFBundleDisplayName = "Выполни меня (помощник)";
3 |
4 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour.xcodeproj/xcuserdata/yuri.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/Icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/Icon.icns
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/MainMenu.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/MainMenu.nib
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviour-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'OnAppBehaviour' target in the 'OnAppBehaviour' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/MacOS/OnAppBehaviourHelper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/MacOS/OnAppBehaviourHelper
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/en.lproj/InfoPlist.strings
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/ru.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kyrie1965/OnAppBehaviour/master/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Resources/ru.lproj/InfoPlist.strings
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/OnAppBehaviourHelper-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'OnAppBehaviourHelper' target in the 'OnAppBehaviourHelper' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OnAppBehaviourHelper
4 | //
5 | // Created by Yuri Yuriev on 11.04.11.
6 | // Copyright 2011 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, char *argv[])
12 | {
13 | return NSApplicationMain(argc, (const char **)argv);
14 | }
15 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/ru.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | "Applications" = "Программы";
2 | "ChooseApplication" = "Пожалуйста, выберите программу";
3 | "DidLaunch" = "Программа запущена";
4 | "DidTerminate" = "Программа завершена";
5 | "DidHide" = "Программа скрыта";
6 | "DidUnhide" = "Программа показана (после скрытия)";
7 | "DidActivate" = "Программа активирована";
8 | "DidDeactivate" = "Программа деактивирована";
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/PopUpCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // PopUpCell.h
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 08.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface PopUpCell : NSPopUpButtonCell
13 | {
14 | NSButtonCell *buttonCell;
15 | }
16 |
17 |
18 | - (id)initWithimage:(NSImage *)image;
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | "Applications" = "Applications";
2 | "ChooseApplication" = "Please choose an application";
3 | "DidLaunch" = "The application has started up";
4 | "DidTerminate" = "The application finishes executing";
5 | "DidHide" = "The Finder hid the application";
6 | "DidUnhide" = "The Finder unhid the application";
7 | "DidActivate" = "The Finder is about to activate the application";
8 | "DidDeactivate" = "The Finder deactivated the application";
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/LoginItems.h:
--------------------------------------------------------------------------------
1 | //
2 | // LoginItems.h
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 08.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface LoginItems : NSObject
13 | {
14 |
15 | }
16 |
17 |
18 | + (void)addApplication:(NSString *)path;
19 | + (void)removeApplication:(NSString *)path;
20 | + (BOOL)findApplication:(NSString *)path;
21 |
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/PopUpButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // PopUpButton.h
3 | // testtv
4 | //
5 | // Created by Yuri Yuriev on 08.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @protocol PopUpDelegate
13 | @optional
14 | - (NSMenu *)menuForPopUp;
15 | @end
16 |
17 |
18 | @interface PopUpButton : NSPopUpButton
19 | {
20 | id delegate;
21 | }
22 |
23 |
24 | @property (assign) id delegate;
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/AppCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppCell.h
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 07.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface AppCell : NSTextFieldCell
13 | {
14 | NSImage *image;
15 | NSString *title;
16 | NSString *subtitle;
17 | }
18 |
19 |
20 | @property (retain) NSImage *image;
21 | @property (retain) NSString *title;
22 | @property (retain) NSString *subtitle;
23 |
24 |
25 | @end
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/PopUpButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // PopUpButton.m
3 | // testtv
4 | //
5 | // Created by Yuri Yuriev on 08.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import "PopUpButton.h"
10 |
11 |
12 | @implementation PopUpButton
13 |
14 |
15 | @synthesize delegate;
16 |
17 |
18 | - (void)mouseDown:(NSEvent *)event
19 | {
20 | if([delegate respondsToSelector:@selector(menuForPopUp)])
21 | {
22 | [self setMenu:[delegate menuForPopUp]];
23 | }
24 |
25 | [super mouseDown:event];
26 | }
27 |
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/OnAppBehaviourHelperAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // OnAppBehaviourHelperAppDelegate.h
3 | // OnAppBehaviourHelper
4 | //
5 | // Created by Yuri Yuriev on 11.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface OnAppBehaviourHelperAppDelegate : NSObject
13 | {
14 | NSArray *preferences;
15 | }
16 |
17 |
18 | - (void)loadPreferences:(NSNotification *)notification;
19 | - (void)preformScriptOnApp:(NSRunningApplication *)app forKey:(NSString *)key;
20 |
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour.xcodeproj/xcuserdata/yuri.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OnAppBehaviour.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DA121762134DB9C4006D208B
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper.xcodeproj/xcuserdata/yuri.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | OnAppBehaviourHelper.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | DAFDA3F51352E08000E529FA
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/PopUpCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // PopUpCell.m
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 08.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import "PopUpCell.h"
10 |
11 |
12 | @implementation PopUpCell
13 |
14 |
15 | - (id)initWithimage:(NSImage *)image
16 | {
17 | self = [super initTextCell:@"" pullsDown:YES];
18 |
19 | buttonCell = [[NSButtonCell alloc] initImageCell:image];
20 | [buttonCell setButtonType:NSPushOnPushOffButton];
21 | [buttonCell setImagePosition:NSImageOnly];
22 | [buttonCell setImageDimsWhenDisabled:YES];
23 | [buttonCell setBordered:NO];
24 |
25 | return self;
26 | }
27 |
28 |
29 | - (void)dealloc
30 | {
31 | [buttonCell release];
32 |
33 | [super dealloc];
34 | }
35 |
36 |
37 | - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
38 | {
39 | [buttonCell drawWithFrame:cellFrame inView:controlView];
40 | }
41 |
42 |
43 | - (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView *)controlView
44 | {
45 | [buttonCell highlight:flag withFrame:cellFrame inView:controlView];
46 | }
47 |
48 |
49 | @end
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/OnAppBehaviourHelper-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 | Icon
11 | CFBundleIdentifier
12 | yuriev.info.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | YYYY
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | 10.6.0
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 | LSBackgroundOnly
32 |
33 | NSHumanReadableCopyright
34 | Copyright © 2011 Yuri Yuriev. All rights reserved.
35 |
36 |
37 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviour-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | yuriev.info.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | BNDL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | YYYY
23 | CFBundleVersion
24 | 1.0
25 | NSHumanReadableCopyright
26 | Copyright © 2011 Yuri Yuriev. All rights reserved.
27 | NSMainNibFile
28 | OnAppBehaviour
29 | NSPrefPaneIconFile
30 | Icon.png
31 | NSPrefPaneIconLabel
32 | OnAppBehaviour
33 | NSPrincipalClass
34 | OnAppBehaviour
35 | LSMinimumSystemVersion
36 | 10.6.0
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviour.h:
--------------------------------------------------------------------------------
1 | //
2 | // OnAppBehaviour.h
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 07.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppCell.h"
11 | #import "PopUpCell.h"
12 | #import "PopUpButton.h"
13 | #import "LoginItems.h"
14 |
15 | @interface OnAppBehaviour : NSPreferencePane
16 | {
17 | IBOutlet NSTableView *appTable;
18 |
19 | IBOutlet NSTextField *textFieldInfo;
20 |
21 | IBOutlet NSTextField *textFieldDidLaunch;
22 | IBOutlet NSTextField *textFieldDidTerminate;
23 | IBOutlet NSTextField *textFieldDidHide;
24 | IBOutlet NSTextField *textFieldDidUnhide;
25 | IBOutlet NSTextField *textFieldDidActivate;
26 | IBOutlet NSTextField *textFieldDidDeactivate;
27 |
28 | IBOutlet NSTextView *textViewDidLaunch;
29 | IBOutlet NSTextView *textViewDidTerminate;
30 | IBOutlet NSTextView *textViewDidHide;
31 | IBOutlet NSTextView *textViewDidUnhide;
32 | IBOutlet NSTextView *textViewDidActivate;
33 | IBOutlet NSTextView *textViewDidDeactivate;
34 |
35 | PopUpButton *addButton;
36 | NSButton *removeButton;
37 |
38 | NSMutableArray *menu;
39 | NSMutableArray *tableDataSource;
40 |
41 | BOOL saved;
42 | }
43 |
44 |
45 | - (void)mainViewDidLoad;
46 | - (NSMenu *)menuForPopUp;
47 | - (void)savePreferences;
48 | - (void)loadPreferences;
49 | - (void)helperNotify;
50 | - (void)helperRun;
51 | - (void)setViewToRow:(NSInteger)row;
52 | - (void)saveCurrentData;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviourHelper.app/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 10J869
7 | CFBundleDevelopmentRegion
8 | en
9 | CFBundleExecutable
10 | OnAppBehaviourHelper
11 | CFBundleIconFile
12 | Icon
13 | CFBundleIdentifier
14 | yuriev.info.OnAppBehaviourHelper
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | OnAppBehaviourHelper
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleSignature
24 | YYYY
25 | CFBundleVersion
26 | 1
27 | DTCompiler
28 | com.apple.compilers.llvm.clang.1_0
29 | DTPlatformBuild
30 | 4A304a
31 | DTPlatformVersion
32 | GM
33 | DTSDKBuild
34 | 4A304a
35 | DTSDKName
36 | macosx10.6
37 | DTXcode
38 | 0400
39 | DTXcodeBuild
40 | 4A304a
41 | LSBackgroundOnly
42 |
43 | LSMinimumSystemVersion
44 | 10.6.0
45 | NSHumanReadableCopyright
46 | Copyright © 2011 Yuri Yuriev. All rights reserved.
47 | NSMainNibFile
48 | MainMenu
49 | NSPrincipalClass
50 | NSApplication
51 |
52 |
53 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour.xcodeproj/xcuserdata/yuri.xcuserdatad/xcschemes/OnAppBehaviour.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
40 |
41 |
42 |
43 |
50 |
51 |
53 |
54 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/LoginItems.m:
--------------------------------------------------------------------------------
1 | //
2 | // LoginItems.m
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 08.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import "LoginItems.h"
10 |
11 |
12 | @implementation LoginItems
13 |
14 |
15 | + (void)addApplication:(NSString *)path
16 | {
17 | LSSharedFileListRef loginItemsRef = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
18 |
19 | if (loginItemsRef)
20 | {
21 | LSSharedFileListItemRef itemRef = LSSharedFileListInsertItemURL(loginItemsRef, kLSSharedFileListItemLast, NULL, NULL, (CFURLRef)[NSURL fileURLWithPath:path], NULL, NULL);
22 | if (itemRef) CFRelease(itemRef);
23 | CFRelease(loginItemsRef);
24 | }
25 | }
26 |
27 |
28 | + (void)removeApplication:(NSString *)path
29 | {
30 | CFURLRef appURL = (CFURLRef)[NSURL fileURLWithPath:path];
31 | LSSharedFileListRef loginItemsRef = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
32 |
33 | if (loginItemsRef)
34 | {
35 | UInt32 seedValue;
36 | NSArray *loginItems = (NSArray *)LSSharedFileListCopySnapshot(loginItemsRef, &seedValue);
37 |
38 | for(id loginItem in loginItems)
39 | {
40 | LSSharedFileListItemRef itemRef = (LSSharedFileListItemRef)loginItem;
41 | CFURLRef URL = NULL;
42 | OSStatus err = LSSharedFileListItemResolve(itemRef, 0, &URL, NULL);
43 |
44 | if (err == noErr)
45 | {
46 | if (CFEqual(appURL, URL)) LSSharedFileListItemRemove(loginItemsRef,itemRef);
47 | CFRelease(URL);
48 | }
49 | }
50 |
51 | [loginItems release];
52 | CFRelease(loginItemsRef);
53 | }
54 | }
55 |
56 |
57 | + (BOOL)findApplication:(NSString *)path
58 | {
59 | CFURLRef appURL = (CFURLRef)[NSURL fileURLWithPath:path];
60 | LSSharedFileListRef loginItemsRef = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
61 |
62 | if (loginItemsRef)
63 | {
64 | BOOL found = NO;
65 | UInt32 seedValue;
66 | NSArray *loginItems = (NSArray *)LSSharedFileListCopySnapshot(loginItemsRef, &seedValue);
67 |
68 | for(id loginItem in loginItems)
69 | {
70 | LSSharedFileListItemRef itemRef = (LSSharedFileListItemRef)loginItem;
71 | CFURLRef URL = NULL;
72 | OSStatus err = LSSharedFileListItemResolve(itemRef, 0, &URL, NULL);
73 |
74 | if (err == noErr)
75 | {
76 | found = CFEqual(appURL, URL);
77 | CFRelease(URL);
78 |
79 | break;
80 | }
81 | }
82 |
83 | [loginItems release];
84 | CFRelease(loginItemsRef);
85 |
86 | return found;
87 | }
88 |
89 | return NO;
90 | }
91 |
92 |
93 | @end
94 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper.xcodeproj/xcuserdata/yuri.xcuserdatad/xcschemes/OnAppBehaviourHelper.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
40 |
41 |
47 |
48 |
49 |
50 |
51 |
52 |
59 |
60 |
66 |
67 |
68 |
69 |
71 |
72 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/OnAppBehaviourHelperAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // OnAppBehaviourHelperAppDelegate.m
3 | // OnAppBehaviourHelper
4 | //
5 | // Created by Yuri Yuriev on 11.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import "OnAppBehaviourHelperAppDelegate.h"
10 |
11 |
12 | @implementation OnAppBehaviourHelperAppDelegate
13 |
14 |
15 |
16 | - (void)dealloc
17 | {
18 | if (preferences) [preferences release];
19 |
20 | [super dealloc];
21 | }
22 |
23 |
24 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
25 | {
26 | [self loadPreferences:nil];
27 |
28 | NSNotificationCenter *notificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
29 |
30 | [notificationCenter addObserver:self selector:@selector(didLaunchApplication:) name:NSWorkspaceDidLaunchApplicationNotification object:nil];
31 | [notificationCenter addObserver:self selector:@selector(didTerminateApplication:) name:NSWorkspaceDidTerminateApplicationNotification object:nil];
32 | [notificationCenter addObserver:self selector:@selector(didHideApplication:) name:NSWorkspaceDidHideApplicationNotification object:nil];
33 | [notificationCenter addObserver:self selector:@selector(didUnhideApplication:) name:NSWorkspaceDidUnhideApplicationNotification object:nil];
34 | [notificationCenter addObserver:self selector:@selector(didActivateApplication:) name:NSWorkspaceDidActivateApplicationNotification object:nil];
35 | [notificationCenter addObserver:self selector:@selector(didDeactivateApplication:) name:NSWorkspaceDidDeactivateApplicationNotification object:nil];
36 |
37 | NSString *observedObject = @"info.yuriev.OnAppBehaviourHelper";
38 | NSDistributedNotificationCenter *dNotificationCenter = [NSDistributedNotificationCenter defaultCenter];
39 |
40 | [dNotificationCenter addObserver: self selector: @selector(loadPreferences:) name:@"OABReloadScripts" object:observedObject];
41 | }
42 |
43 |
44 | - (void)loadPreferences:(NSNotification *)notification
45 | {
46 | if (preferences) [preferences release];
47 |
48 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
49 | NSString *appSupportPath = [paths objectAtIndex:0];
50 | NSString *prefDir = [appSupportPath stringByAppendingPathComponent:@"info.yuriev.OnAppBehaviour"];
51 | NSString *prefPath = [prefDir stringByAppendingPathComponent:@"preferences.plist"];
52 |
53 | preferences = [NSArray arrayWithContentsOfFile:prefPath];
54 | if (!preferences) preferences = [NSArray array];
55 |
56 | [preferences retain];
57 | }
58 |
59 |
60 | - (void)preformScriptOnApp:(NSRunningApplication *)app forKey:(NSString *)key
61 | {
62 | if ((!app) || (![app bundleIdentifier])) return;
63 |
64 | NSString *bundleID = [app bundleIdentifier];
65 |
66 | for (int i = 0; i < [preferences count]; i++)
67 | {
68 | if ([[[preferences objectAtIndex:i] objectForKey:@"ID"] isEqualToString:bundleID])
69 | {
70 | NSString *script = [[preferences objectAtIndex:i] objectForKey:key];
71 |
72 | if (script && ([script length] > 0))
73 | {
74 | NSAppleScript *AScript = [[NSAppleScript alloc] initWithSource:script];
75 | [AScript executeAndReturnError:NULL];
76 | [AScript release];
77 | }
78 |
79 | break;
80 | }
81 | }
82 |
83 | }
84 |
85 |
86 | -(void)didLaunchApplication:(NSNotification *)notification
87 | {
88 | [self preformScriptOnApp:[[notification userInfo] objectForKey:@"NSWorkspaceApplicationKey"] forKey:@"DidLaunch"];
89 | }
90 |
91 |
92 | -(void)didTerminateApplication:(NSNotification *)notification
93 | {
94 | [self preformScriptOnApp:[[notification userInfo] objectForKey:@"NSWorkspaceApplicationKey"] forKey:@"DidTerminate"];
95 | }
96 |
97 |
98 | -(void)didHideApplication:(NSNotification *)notification
99 | {
100 | [self preformScriptOnApp:[[notification userInfo] objectForKey:@"NSWorkspaceApplicationKey"] forKey:@"DidHide"];
101 | }
102 |
103 |
104 | -(void)didUnhideApplication:(NSNotification *)notification
105 | {
106 | [self preformScriptOnApp:[[notification userInfo] objectForKey:@"NSWorkspaceApplicationKey"] forKey:@"DidUnhide"];
107 | }
108 |
109 |
110 | -(void)didActivateApplication:(NSNotification *)notification
111 | {
112 | [self preformScriptOnApp:[[notification userInfo] objectForKey:@"NSWorkspaceApplicationKey"] forKey:@"DidActivate"];
113 | }
114 |
115 |
116 | -(void)didDeactivateApplication:(NSNotification *)notification
117 | {
118 | [self preformScriptOnApp:[[notification userInfo] objectForKey:@"NSWorkspaceApplicationKey"] forKey:@"DidDeactivate"];
119 | }
120 |
121 |
122 | @end
123 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/AppCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppCell.m
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 07.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import "AppCell.h"
10 |
11 |
12 | #define IMAGE_INSET 5.0
13 | #define TITLE_HEIGHT 17.0
14 |
15 |
16 | @implementation AppCell
17 |
18 |
19 | @synthesize image;
20 | @synthesize title;
21 | @synthesize subtitle;
22 |
23 |
24 | - (id)init
25 | {
26 | self = [super init];
27 |
28 | image = nil;
29 | title = nil;
30 | subtitle = nil;
31 |
32 | return self;
33 | }
34 |
35 |
36 | - (void)dealloc
37 | {
38 | if (image) [image release];
39 | if (title) [title release];
40 | if (subtitle) [subtitle release];
41 |
42 | [super dealloc];
43 | }
44 |
45 |
46 | - (id)copyWithZone:(NSZone *)zone
47 | {
48 | AppCell *cell = [super copyWithZone:zone];
49 |
50 | cell->title = nil;
51 | cell->subtitle = nil;
52 | cell->image = nil;
53 |
54 | cell.title = self.title;
55 | cell.subtitle = self.subtitle;
56 | cell.image = self.image;
57 |
58 | return cell;
59 | }
60 |
61 |
62 | - (NSRect)titleRectForBounds:(NSRect)inBounds
63 | {
64 | NSRect imageRect = [self imageRectForBounds:inBounds];
65 |
66 | NSRect rect = NSInsetRect(inBounds,IMAGE_INSET,IMAGE_INSET);
67 | rect.origin.x = NSMaxX(imageRect) + IMAGE_INSET;
68 | rect.size.width = NSMaxX(inBounds) - IMAGE_INSET - NSWidth(imageRect) - IMAGE_INSET;
69 | rect.size.height = TITLE_HEIGHT;
70 |
71 | return rect;
72 | }
73 |
74 |
75 | - (NSRect)subtitleRectForBounds:(NSRect)inBounds
76 | {
77 | NSRect rect = [self titleRectForBounds:inBounds];
78 | rect.origin.y = NSMaxY(rect);
79 | rect.size.height = NSHeight(inBounds) - IMAGE_INSET - TITLE_HEIGHT - IMAGE_INSET;
80 |
81 | return rect;
82 | }
83 |
84 |
85 | - (NSRect)imageRectForBounds:(NSRect)inBounds
86 | {
87 | NSRect rect = NSInsetRect(inBounds,IMAGE_INSET,IMAGE_INSET);
88 | rect.size.width = rect.size.height;
89 |
90 | return rect;
91 | }
92 |
93 |
94 | - (NSRect)imageRectForFrame:(NSRect)inImageFrame imageWidth:(CGFloat)inWidth imageHeight:(CGFloat)inHeight
95 | {
96 | CGFloat f = 1.0;
97 | if (inWidth > inImageFrame.size.width || inHeight > inImageFrame.size.height)
98 | {
99 | CGFloat fx = inImageFrame.size.width / inWidth;
100 | CGFloat fy = inImageFrame.size.height / inHeight;
101 | f = MIN(fx,fy);
102 | }
103 |
104 | CGFloat x0 = NSMidX(inImageFrame);
105 | CGFloat y0 = NSMidY(inImageFrame);
106 | CGFloat width = f * inWidth;
107 | CGFloat height = f * inHeight;
108 |
109 | NSRect rect;
110 | rect.origin.x = round(x0 - 0.5*width);
111 | rect.origin.y = round(y0 - 0.5*height);
112 | rect.size.width = round(width);
113 | rect.size.height = round(height);
114 |
115 | return rect;
116 | }
117 |
118 |
119 | - (void)drawInteriorWithFrame:(NSRect)inCellFrame inView:(NSView*)inView
120 | {
121 | NSRect imageRect = [self imageRectForBounds:inCellFrame];
122 | NSRect titleRect = [self titleRectForBounds:inCellFrame];
123 | NSRect subtitleRect = [self subtitleRectForBounds:inCellFrame];
124 |
125 | NSMutableParagraphStyle* paragraphStyle = [[[NSMutableParagraphStyle alloc] init] autorelease];
126 | [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
127 |
128 | if (title)
129 | {
130 | NSColor *titleColor = [self isHighlighted] ? [NSColor alternateSelectedControlTextColor] : [NSColor textColor];
131 |
132 | NSDictionary *titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys: titleColor, NSForegroundColorAttributeName, [NSFont systemFontOfSize:13], NSFontAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil];
133 |
134 | [title drawInRect:titleRect withAttributes:titleTextAttributes];
135 |
136 | }
137 |
138 | if (subtitle)
139 | {
140 | NSColor *subtitleColor = [self isHighlighted] ? [NSColor alternateSelectedControlTextColor] : [NSColor disabledControlTextColor];
141 |
142 | NSDictionary *subtitleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys: subtitleColor, NSForegroundColorAttributeName, [NSFont systemFontOfSize:10], NSFontAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil];
143 |
144 | [subtitle drawInRect:subtitleRect withAttributes:subtitleTextAttributes];
145 |
146 | }
147 |
148 | if (image)
149 | {
150 | NSRect rect = [self imageRectForFrame:imageRect imageWidth:[image size].width imageHeight:[image size].height];
151 |
152 | [[NSGraphicsContext currentContext] saveGraphicsState];
153 | [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh];
154 |
155 | [image drawInRect:rect
156 | fromRect:NSZeroRect
157 | operation:NSCompositeSourceOver
158 | fraction:1.0f
159 | respectFlipped:[inView isFlipped]
160 | hints:nil];
161 |
162 |
163 | [[NSGraphicsContext currentContext] restoreGraphicsState];
164 | }
165 | }
166 |
167 |
168 |
169 | @end
170 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1060
5 | 10J869
6 | 1305
7 | 1038.35
8 | 461.00
9 |
13 |
14 | NSCustomObject
15 |
16 |
17 | com.apple.InterfaceBuilder.CocoaPlugin
18 |
19 |
20 |
21 |
24 |
27 |
30 |
33 |
34 |
90 |
91 |
92 |
93 | OnAppBehaviourHelperAppDelegate
94 | NSObject
95 |
96 | IBProjectSource
97 | ./Classes/OnAppBehaviourHelperAppDelegate.h
98 |
99 |
100 |
101 |
102 | 0
103 | IBCocoaFramework
104 |
105 | com.apple.InterfaceBuilder.CocoaPlugin.macosx
106 |
107 |
108 |
109 | com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3
110 |
111 |
112 | YES
113 | 3
114 |
115 |
116 |
--------------------------------------------------------------------------------
/OnAppBehaviourHelper/OnAppBehaviourHelper.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DAFDA3FB1352E08000E529FA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAFDA3FA1352E08000E529FA /* Cocoa.framework */; };
11 | DAFDA4051352E08000E529FA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DAFDA4031352E08000E529FA /* InfoPlist.strings */; };
12 | DAFDA4081352E08000E529FA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFDA4071352E08000E529FA /* main.m */; };
13 | DAFDA40E1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFDA40D1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.m */; };
14 | DAFDA4201352E13700E529FA /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = DAFDA41F1352E13700E529FA /* Icon.icns */; };
15 | DAFDA4241352FAFE00E529FA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAFDA4251352FAFE00E529FA /* MainMenu.xib */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | DAFDA3F61352E08000E529FA /* OnAppBehaviourHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OnAppBehaviourHelper.app; sourceTree = BUILT_PRODUCTS_DIR; };
20 | DAFDA3FA1352E08000E529FA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
21 | DAFDA3FD1352E08000E529FA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
22 | DAFDA3FE1352E08000E529FA /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
23 | DAFDA3FF1352E08000E529FA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
24 | DAFDA4021352E08000E529FA /* OnAppBehaviourHelper-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OnAppBehaviourHelper-Info.plist"; sourceTree = ""; };
25 | DAFDA4041352E08000E529FA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
26 | DAFDA4061352E08000E529FA /* OnAppBehaviourHelper-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OnAppBehaviourHelper-Prefix.pch"; sourceTree = ""; };
27 | DAFDA4071352E08000E529FA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
28 | DAFDA40C1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OnAppBehaviourHelperAppDelegate.h; sourceTree = ""; };
29 | DAFDA40D1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OnAppBehaviourHelperAppDelegate.m; sourceTree = ""; };
30 | DAFDA41F1352E13700E529FA /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; };
31 | DAFDA4231352F9C200E529FA /* ru */ = {isa = PBXFileReference; lastKnownFileType = file; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; };
32 | DAFDA4251352FAFE00E529FA /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file; path = MainMenu.xib; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | DAFDA3F31352E08000E529FA /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | DAFDA3FB1352E08000E529FA /* Cocoa.framework in Frameworks */,
41 | );
42 | runOnlyForDeploymentPostprocessing = 0;
43 | };
44 | /* End PBXFrameworksBuildPhase section */
45 |
46 | /* Begin PBXGroup section */
47 | DAFDA3EB1352E08000E529FA = {
48 | isa = PBXGroup;
49 | children = (
50 | DAFDA4001352E08000E529FA /* OnAppBehaviourHelper */,
51 | DAFDA3F91352E08000E529FA /* Frameworks */,
52 | DAFDA3F71352E08000E529FA /* Products */,
53 | );
54 | sourceTree = "";
55 | };
56 | DAFDA3F71352E08000E529FA /* Products */ = {
57 | isa = PBXGroup;
58 | children = (
59 | DAFDA3F61352E08000E529FA /* OnAppBehaviourHelper.app */,
60 | );
61 | name = Products;
62 | sourceTree = "";
63 | };
64 | DAFDA3F91352E08000E529FA /* Frameworks */ = {
65 | isa = PBXGroup;
66 | children = (
67 | DAFDA3FA1352E08000E529FA /* Cocoa.framework */,
68 | DAFDA3FC1352E08000E529FA /* Other Frameworks */,
69 | );
70 | name = Frameworks;
71 | sourceTree = "";
72 | };
73 | DAFDA3FC1352E08000E529FA /* Other Frameworks */ = {
74 | isa = PBXGroup;
75 | children = (
76 | DAFDA3FD1352E08000E529FA /* AppKit.framework */,
77 | DAFDA3FE1352E08000E529FA /* CoreData.framework */,
78 | DAFDA3FF1352E08000E529FA /* Foundation.framework */,
79 | );
80 | name = "Other Frameworks";
81 | sourceTree = "";
82 | };
83 | DAFDA4001352E08000E529FA /* OnAppBehaviourHelper */ = {
84 | isa = PBXGroup;
85 | children = (
86 | DAFDA40C1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.h */,
87 | DAFDA40D1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.m */,
88 | DAFDA4251352FAFE00E529FA /* MainMenu.xib */,
89 | DAFDA4011352E08000E529FA /* Supporting Files */,
90 | );
91 | path = OnAppBehaviourHelper;
92 | sourceTree = "";
93 | };
94 | DAFDA4011352E08000E529FA /* Supporting Files */ = {
95 | isa = PBXGroup;
96 | children = (
97 | DAFDA41F1352E13700E529FA /* Icon.icns */,
98 | DAFDA4021352E08000E529FA /* OnAppBehaviourHelper-Info.plist */,
99 | DAFDA4031352E08000E529FA /* InfoPlist.strings */,
100 | DAFDA4061352E08000E529FA /* OnAppBehaviourHelper-Prefix.pch */,
101 | DAFDA4071352E08000E529FA /* main.m */,
102 | );
103 | name = "Supporting Files";
104 | sourceTree = "";
105 | };
106 | /* End PBXGroup section */
107 |
108 | /* Begin PBXNativeTarget section */
109 | DAFDA3F51352E08000E529FA /* OnAppBehaviourHelper */ = {
110 | isa = PBXNativeTarget;
111 | buildConfigurationList = DAFDA4141352E08100E529FA /* Build configuration list for PBXNativeTarget "OnAppBehaviourHelper" */;
112 | buildPhases = (
113 | DAFDA3F21352E08000E529FA /* Sources */,
114 | DAFDA3F31352E08000E529FA /* Frameworks */,
115 | DAFDA3F41352E08000E529FA /* Resources */,
116 | );
117 | buildRules = (
118 | );
119 | dependencies = (
120 | );
121 | name = OnAppBehaviourHelper;
122 | productName = OnAppBehaviourHelper;
123 | productReference = DAFDA3F61352E08000E529FA /* OnAppBehaviourHelper.app */;
124 | productType = "com.apple.product-type.application";
125 | };
126 | /* End PBXNativeTarget section */
127 |
128 | /* Begin PBXProject section */
129 | DAFDA3ED1352E08000E529FA /* Project object */ = {
130 | isa = PBXProject;
131 | buildConfigurationList = DAFDA3F01352E08000E529FA /* Build configuration list for PBXProject "OnAppBehaviourHelper" */;
132 | compatibilityVersion = "Xcode 3.2";
133 | developmentRegion = English;
134 | hasScannedForEncodings = 0;
135 | knownRegions = (
136 | en,
137 | ru,
138 | );
139 | mainGroup = DAFDA3EB1352E08000E529FA;
140 | productRefGroup = DAFDA3F71352E08000E529FA /* Products */;
141 | projectDirPath = "";
142 | projectRoot = "";
143 | targets = (
144 | DAFDA3F51352E08000E529FA /* OnAppBehaviourHelper */,
145 | );
146 | };
147 | /* End PBXProject section */
148 |
149 | /* Begin PBXResourcesBuildPhase section */
150 | DAFDA3F41352E08000E529FA /* Resources */ = {
151 | isa = PBXResourcesBuildPhase;
152 | buildActionMask = 2147483647;
153 | files = (
154 | DAFDA4051352E08000E529FA /* InfoPlist.strings in Resources */,
155 | DAFDA4241352FAFE00E529FA /* MainMenu.xib in Resources */,
156 | DAFDA4201352E13700E529FA /* Icon.icns in Resources */,
157 | );
158 | runOnlyForDeploymentPostprocessing = 0;
159 | };
160 | /* End PBXResourcesBuildPhase section */
161 |
162 | /* Begin PBXSourcesBuildPhase section */
163 | DAFDA3F21352E08000E529FA /* Sources */ = {
164 | isa = PBXSourcesBuildPhase;
165 | buildActionMask = 2147483647;
166 | files = (
167 | DAFDA4081352E08000E529FA /* main.m in Sources */,
168 | DAFDA40E1352E08000E529FA /* OnAppBehaviourHelperAppDelegate.m in Sources */,
169 | );
170 | runOnlyForDeploymentPostprocessing = 0;
171 | };
172 | /* End PBXSourcesBuildPhase section */
173 |
174 | /* Begin PBXVariantGroup section */
175 | DAFDA4031352E08000E529FA /* InfoPlist.strings */ = {
176 | isa = PBXVariantGroup;
177 | children = (
178 | DAFDA4041352E08000E529FA /* en */,
179 | DAFDA4231352F9C200E529FA /* ru */,
180 | );
181 | name = InfoPlist.strings;
182 | sourceTree = "";
183 | };
184 | /* End PBXVariantGroup section */
185 |
186 | /* Begin XCBuildConfiguration section */
187 | DAFDA4121352E08100E529FA /* Debug */ = {
188 | isa = XCBuildConfiguration;
189 | buildSettings = {
190 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
191 | GCC_C_LANGUAGE_STANDARD = gnu99;
192 | GCC_OPTIMIZATION_LEVEL = 0;
193 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
194 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
195 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
197 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
198 | GCC_WARN_UNUSED_VARIABLE = YES;
199 | MACOSX_DEPLOYMENT_TARGET = 10.6;
200 | ONLY_ACTIVE_ARCH = YES;
201 | SDKROOT = macosx;
202 | };
203 | name = Debug;
204 | };
205 | DAFDA4131352E08100E529FA /* Release */ = {
206 | isa = XCBuildConfiguration;
207 | buildSettings = {
208 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
209 | GCC_C_LANGUAGE_STANDARD = gnu99;
210 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
211 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
212 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
213 | GCC_WARN_UNUSED_VARIABLE = YES;
214 | MACOSX_DEPLOYMENT_TARGET = 10.6;
215 | SDKROOT = macosx;
216 | };
217 | name = Release;
218 | };
219 | DAFDA4151352E08100E529FA /* Debug */ = {
220 | isa = XCBuildConfiguration;
221 | buildSettings = {
222 | ALWAYS_SEARCH_USER_PATHS = NO;
223 | COPY_PHASE_STRIP = NO;
224 | GCC_DYNAMIC_NO_PIC = NO;
225 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
226 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
227 | GCC_PREFIX_HEADER = "OnAppBehaviourHelper/OnAppBehaviourHelper-Prefix.pch";
228 | INFOPLIST_FILE = "OnAppBehaviourHelper/OnAppBehaviourHelper-Info.plist";
229 | PRODUCT_NAME = "$(TARGET_NAME)";
230 | WRAPPER_EXTENSION = app;
231 | };
232 | name = Debug;
233 | };
234 | DAFDA4161352E08100E529FA /* Release */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | COPY_PHASE_STRIP = YES;
239 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
240 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
241 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
242 | GCC_PREFIX_HEADER = "OnAppBehaviourHelper/OnAppBehaviourHelper-Prefix.pch";
243 | INFOPLIST_FILE = "OnAppBehaviourHelper/OnAppBehaviourHelper-Info.plist";
244 | PRODUCT_NAME = "$(TARGET_NAME)";
245 | WRAPPER_EXTENSION = app;
246 | };
247 | name = Release;
248 | };
249 | /* End XCBuildConfiguration section */
250 |
251 | /* Begin XCConfigurationList section */
252 | DAFDA3F01352E08000E529FA /* Build configuration list for PBXProject "OnAppBehaviourHelper" */ = {
253 | isa = XCConfigurationList;
254 | buildConfigurations = (
255 | DAFDA4121352E08100E529FA /* Debug */,
256 | DAFDA4131352E08100E529FA /* Release */,
257 | );
258 | defaultConfigurationIsVisible = 0;
259 | defaultConfigurationName = Release;
260 | };
261 | DAFDA4141352E08100E529FA /* Build configuration list for PBXNativeTarget "OnAppBehaviourHelper" */ = {
262 | isa = XCConfigurationList;
263 | buildConfigurations = (
264 | DAFDA4151352E08100E529FA /* Debug */,
265 | DAFDA4161352E08100E529FA /* Release */,
266 | );
267 | defaultConfigurationIsVisible = 0;
268 | };
269 | /* End XCConfigurationList section */
270 | };
271 | rootObject = DAFDA3ED1352E08000E529FA /* Project object */;
272 | }
273 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviour.m:
--------------------------------------------------------------------------------
1 | //
2 | // OnAppBehaviour.m
3 | // OnAppBehaviour
4 | //
5 | // Created by Yuri Yuriev on 07.04.11.
6 | // Copyright 2011 Yuri Yuriev. All rights reserved.
7 | //
8 |
9 | #import "OnAppBehaviour.h"
10 |
11 |
12 | @implementation NSImage (PNGExport)
13 |
14 |
15 | - (NSData *)PNGData
16 | {
17 | [self lockFocus];
18 | NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, [self size].width, [self size].height)];
19 | [self unlockFocus];
20 |
21 | NSData *PNGData = [rep representationUsingType:NSPNGFileType properties:nil];
22 | [rep release];
23 |
24 | return PNGData;
25 | }
26 |
27 |
28 | @end
29 |
30 |
31 | @implementation OnAppBehaviour
32 |
33 |
34 | #pragma mark -
35 | #pragma mark Init
36 |
37 |
38 | - (void)mainViewDidLoad
39 | {
40 | [textFieldInfo setStringValue:NSLocalizedStringFromTableInBundle(@"ChooseApplication", nil, [self bundle], @"")];
41 |
42 | [textFieldDidLaunch setStringValue:NSLocalizedStringFromTableInBundle(@"DidLaunch", nil, [self bundle], @"")];
43 | [textFieldDidTerminate setStringValue:NSLocalizedStringFromTableInBundle(@"DidTerminate", nil, [self bundle], @"")];
44 | [textFieldDidHide setStringValue:NSLocalizedStringFromTableInBundle(@"DidHide", nil, [self bundle], @"")];
45 | [textFieldDidUnhide setStringValue:NSLocalizedStringFromTableInBundle(@"DidUnhide", nil, [self bundle], @"")];
46 | [textFieldDidActivate setStringValue:NSLocalizedStringFromTableInBundle(@"DidActivate", nil, [self bundle], @"")];
47 | [textFieldDidDeactivate setStringValue:NSLocalizedStringFromTableInBundle(@"DidDeactivate", nil, [self bundle], @"")];
48 |
49 | [self helperRun];
50 | [self loadPreferences];
51 |
52 | NSTableColumn* column = [[appTable tableColumns] objectAtIndex:0];
53 | [[column headerCell] setStringValue:NSLocalizedStringFromTableInBundle(@"Applications", nil, [self bundle], @"")];
54 | [appTable reloadData];
55 |
56 | addButton = [[PopUpButton alloc] initWithFrame:NSMakeRect(20, 19, 23, 22) pullsDown:YES];
57 | addButton.delegate = self;
58 |
59 | NSString *imagePath = [[self bundle] pathForImageResource:@"Add.png"];
60 | NSImage *buttonImage = [[[NSImage alloc] initWithContentsOfFile:imagePath] autorelease];
61 |
62 | [addButton setCell:[[[PopUpCell alloc] initWithimage:buttonImage] autorelease]];
63 | [addButton setMenu:[self menuForPopUp]];
64 | [[self mainView] addSubview:addButton];
65 |
66 | imagePath = [[self bundle] pathForImageResource:@"Remove.png"];
67 | buttonImage = [[[NSImage alloc] initWithContentsOfFile:imagePath] autorelease];
68 |
69 | removeButton = [[NSButton alloc] initWithFrame:NSMakeRect(43, 19, 22, 22)];
70 | [removeButton setButtonType:NSMomentaryChangeButton];
71 | [removeButton setImage:buttonImage];
72 | [removeButton setImagePosition:NSImageOnly];
73 | [removeButton setBordered:NO];
74 | [removeButton setTarget:self];
75 | [removeButton setAction:@selector(removeButtonAction:)];
76 | [[self mainView] addSubview:removeButton];
77 |
78 | [self setViewToRow:-1];
79 | }
80 |
81 |
82 | #pragma mark -
83 | #pragma mark Unselect and Dealloc
84 |
85 |
86 | - (void)willUnselect
87 | {
88 | [self saveCurrentData];
89 | }
90 |
91 |
92 | - (void)dealloc
93 | {
94 | if (menu) [menu release];
95 | if (tableDataSource) [tableDataSource release];
96 | if (addButton) addButton.delegate = nil, [addButton release];
97 | if (removeButton) [addButton release];
98 |
99 | [super dealloc];
100 | }
101 |
102 |
103 | #pragma mark -
104 | #pragma mark Helper
105 |
106 |
107 | - (void)helperNotify
108 | {
109 | NSString *observedObject = @"info.yuriev.OnAppBehaviourHelper";
110 | NSDistributedNotificationCenter *center = [NSDistributedNotificationCenter defaultCenter];
111 | [center postNotificationName:@"OABReloadScripts" object:observedObject userInfo:nil deliverImmediately:YES];
112 | }
113 |
114 |
115 | - (void)helperRun
116 | {
117 | NSArray *apps = [[NSWorkspace sharedWorkspace] runningApplications];
118 | BOOL found = NO;
119 |
120 | for (int i = 0; i < [apps count]; i++)
121 | {
122 | if ([[apps objectAtIndex:i] bundleIdentifier])
123 | {
124 | if ([[[apps objectAtIndex:i] bundleIdentifier] isEqualToString:@"info.yuriev.OnAppBehaviourHelper"])
125 | {
126 | found = YES;
127 | break;
128 | }
129 | }
130 | }
131 |
132 | NSString *helperPath = [[[self bundle] resourcePath] stringByAppendingPathComponent:@"OnAppBehaviourHelper.app"];
133 |
134 | if (!found)
135 | {
136 | [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:helperPath] options:NSWorkspaceLaunchDefault configuration:nil error:NULL];
137 | }
138 |
139 | [LoginItems removeApplication:helperPath];
140 | [LoginItems addApplication:helperPath];
141 | }
142 |
143 |
144 | #pragma mark -
145 | #pragma mark Add and Remove Buttons, PopUp Menu
146 |
147 |
148 | - (void)removeButtonAction:(id)sender
149 | {
150 | [tableDataSource removeObjectAtIndex:[appTable selectedRow]];
151 | [appTable deselectAll:self];
152 | [appTable reloadData];
153 | [NSObject cancelPreviousPerformRequestsWithTarget:self];
154 | [self savePreferences];
155 | [self setViewToRow:-1];
156 | }
157 |
158 |
159 | - (NSMenu *)menuForPopUp
160 | {
161 | if (menu) [menu release];
162 | menu = [[NSMutableArray alloc] initWithCapacity:100];
163 |
164 | NSArray *apps = [[NSWorkspace sharedWorkspace] runningApplications];
165 |
166 | for (int i = 0; i < [apps count]; i++)
167 | {
168 | if (([[apps objectAtIndex:i] localizedName] && [[apps objectAtIndex:i] bundleIdentifier] && [[apps objectAtIndex:i] icon]) &&
169 | (([[[apps objectAtIndex:i] localizedName] length] > 0) && ([[[apps objectAtIndex:i] bundleIdentifier] length] > 0)))
170 | {
171 | NSMutableDictionary *tmpDict = [NSMutableDictionary dictionaryWithCapacity:3];
172 | [tmpDict setObject:[[apps objectAtIndex:i] localizedName] forKey:@"name"];
173 | [tmpDict setObject:[[apps objectAtIndex:i] bundleIdentifier] forKey:@"ID"];
174 | [tmpDict setObject:[[apps objectAtIndex:i] icon] forKey:@"icon"];
175 |
176 | [menu addObject:tmpDict];
177 | }
178 | }
179 |
180 | NSSortDescriptor *desc = [[[NSSortDescriptor alloc]
181 | initWithKey:@"name"
182 | ascending:YES
183 | selector:@selector(caseInsensitiveCompare:)] autorelease];
184 |
185 | NSArray *sortDescriptors = [NSArray arrayWithObjects:desc, nil];
186 |
187 | [menu sortUsingDescriptors:sortDescriptors];
188 |
189 | NSMenu *newMenu;
190 | NSMenuItem *newItem;
191 |
192 | newMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"menu"];
193 | newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"root" action:NULL keyEquivalent:@""];
194 | [newMenu addItem:newItem];
195 | [newItem release];
196 |
197 | if ([menu count] == 0)
198 | {
199 | newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"" action:NULL keyEquivalent:@""];
200 | [newMenu addItem:newItem];
201 | [newItem release];
202 | }
203 |
204 | for (int i = 0; i < [menu count]; i++)
205 | {
206 | newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[[menu objectAtIndex:i] objectForKey:@"name"] action:NULL keyEquivalent:@""];
207 | [newItem setImage:[[menu objectAtIndex:i] objectForKey:@"icon"]];
208 | newItem.tag = 1000 + i;
209 | [newItem setTarget:self];
210 | [newItem setAction:@selector(selectApplicationFromPopUp:)];
211 | [newMenu addItem:newItem];
212 | [newItem release];
213 | }
214 |
215 | return [newMenu autorelease];
216 | }
217 |
218 |
219 | - (void)selectApplicationFromPopUp:(id)sender
220 | {
221 | NSMenuItem *item = (NSMenuItem *)sender;
222 |
223 | NSDictionary *appDict = [menu objectAtIndex:(item.tag - 1000)];
224 |
225 | int index = -1;
226 |
227 | for (int i = 0; i < [tableDataSource count]; i++)
228 | {
229 | if ([[appDict objectForKey:@"ID"] isEqualToString:[[tableDataSource objectAtIndex:i] objectForKey:@"ID"]])
230 | {
231 | index = i;
232 | break;
233 | }
234 | }
235 |
236 | [self saveCurrentData];
237 |
238 | if (index != -1)
239 | {
240 | [appTable selectRowIndexes:[NSIndexSet indexSetWithIndex:index] byExtendingSelection:NO];
241 | [self setViewToRow:index];
242 | [appTable scrollRowToVisible:index];
243 | }
244 | else
245 | {
246 | NSMutableDictionary *tmpDict = [NSMutableDictionary dictionaryWithDictionary:appDict];
247 |
248 | [tmpDict setObject:@"" forKey:@"DidLaunch"];
249 | [tmpDict setObject:@"" forKey:@"DidTerminate"];
250 | [tmpDict setObject:@"" forKey:@"DidHide"];
251 | [tmpDict setObject:@"" forKey:@"DidUnhide"];
252 | [tmpDict setObject:@"" forKey:@"DidActivate"];
253 | [tmpDict setObject:@"" forKey:@"DidDeactivate"];
254 |
255 | [tableDataSource addObject:tmpDict];
256 |
257 | NSSortDescriptor *desc = [[[NSSortDescriptor alloc]
258 | initWithKey:@"name"
259 | ascending:YES
260 | selector:@selector(caseInsensitiveCompare:)] autorelease];
261 |
262 | NSArray *sortDescriptors = [NSArray arrayWithObjects:desc, nil];
263 |
264 | [tableDataSource sortUsingDescriptors:sortDescriptors];
265 |
266 | [appTable deselectAll:self];
267 | [appTable reloadData];
268 |
269 | for (int i = 0; i < [tableDataSource count]; i++)
270 | {
271 | if ([tableDataSource objectAtIndex:i] == tmpDict)
272 | {
273 | [appTable selectRowIndexes:[NSIndexSet indexSetWithIndex:i] byExtendingSelection:NO];
274 | [self setViewToRow:i];
275 | [appTable scrollRowToVisible:i];
276 |
277 | break;
278 | }
279 | }
280 | }
281 |
282 | [[[self mainView] window] makeFirstResponder:appTable];
283 | }
284 |
285 |
286 | #pragma mark -
287 | #pragma mark Scripts View
288 |
289 |
290 | - (void)setViewToRow:(NSInteger)row
291 | {
292 | saved = YES;
293 |
294 | if (row != -1)
295 | {
296 | [textFieldInfo setHidden:YES];
297 |
298 | [textFieldDidLaunch setHidden:NO];
299 | [textFieldDidTerminate setHidden:NO];
300 | [textFieldDidHide setHidden:NO];
301 | [textFieldDidUnhide setHidden:NO];
302 | [textFieldDidActivate setHidden:NO];
303 | [textFieldDidDeactivate setHidden:NO];
304 |
305 | [[textViewDidLaunch enclosingScrollView] setHidden:NO];
306 | [[textViewDidTerminate enclosingScrollView] setHidden:NO];
307 | [[textViewDidHide enclosingScrollView] setHidden:NO];
308 | [[textViewDidUnhide enclosingScrollView] setHidden:NO];
309 | [[textViewDidActivate enclosingScrollView] setHidden:NO];
310 | [[textViewDidDeactivate enclosingScrollView] setHidden:NO];
311 |
312 | NSDictionary *dict = [tableDataSource objectAtIndex:row];
313 | NSRange zeroRange = NSMakeRange(0, 0);
314 |
315 | [textViewDidLaunch setString:[dict objectForKey:@"DidLaunch"]];
316 | [textViewDidLaunch scrollRangeToVisible:zeroRange];
317 | [textViewDidTerminate setString:[dict objectForKey:@"DidTerminate"]];
318 | [textViewDidTerminate scrollRangeToVisible:zeroRange];
319 | [textViewDidHide setString:[dict objectForKey:@"DidHide"]];
320 | [textViewDidHide scrollRangeToVisible:zeroRange];
321 | [textViewDidUnhide setString:[dict objectForKey:@"DidUnhide"]];
322 | [textViewDidUnhide scrollRangeToVisible:zeroRange];
323 | [textViewDidActivate setString:[dict objectForKey:@"DidActivate"]];
324 | [textViewDidActivate scrollRangeToVisible:zeroRange];
325 | [textViewDidDeactivate setString:[dict objectForKey:@"DidDeactivate"]];
326 | [textViewDidDeactivate scrollRangeToVisible:zeroRange];
327 |
328 | [removeButton setEnabled:YES];
329 | }
330 | else
331 | {
332 | [textFieldInfo setHidden:NO];
333 |
334 | [textFieldDidLaunch setHidden:YES];
335 | [textFieldDidTerminate setHidden:YES];
336 | [textFieldDidHide setHidden:YES];
337 | [textFieldDidUnhide setHidden:YES];
338 | [textFieldDidActivate setHidden:YES];
339 | [textFieldDidDeactivate setHidden:YES];
340 |
341 | [[textViewDidLaunch enclosingScrollView] setHidden:YES];
342 | [[textViewDidTerminate enclosingScrollView] setHidden:YES];
343 | [[textViewDidHide enclosingScrollView] setHidden:YES];
344 | [[textViewDidUnhide enclosingScrollView] setHidden:YES];
345 | [[textViewDidActivate enclosingScrollView] setHidden:YES];
346 | [[textViewDidDeactivate enclosingScrollView] setHidden:YES];
347 |
348 | [removeButton setEnabled:NO];
349 | }
350 | }
351 |
352 |
353 | #pragma mark -
354 | #pragma mark Save and Load Preferences
355 |
356 |
357 | - (void)saveCurrentData
358 | {
359 | [NSObject cancelPreviousPerformRequestsWithTarget:self];
360 |
361 | if (saved) return;
362 | saved = YES;
363 |
364 | NSInteger selectedRow = [appTable selectedRow];
365 |
366 | if (selectedRow != -1)
367 | {
368 | NSDictionary *dict = [tableDataSource objectAtIndex:selectedRow];
369 | NSMutableDictionary *tmpDict = [NSMutableDictionary dictionaryWithDictionary:dict];
370 |
371 | [tmpDict setObject:[NSString stringWithString:[[textViewDidLaunch textStorage] string]] forKey:@"DidLaunch"];
372 | [tmpDict setObject:[NSString stringWithString:[[textViewDidTerminate textStorage] string]] forKey:@"DidTerminate"];
373 | [tmpDict setObject:[NSString stringWithString:[[textViewDidHide textStorage] string]] forKey:@"DidHide"];
374 | [tmpDict setObject:[NSString stringWithString:[[textViewDidUnhide textStorage] string]] forKey:@"DidUnhide"];
375 | [tmpDict setObject:[NSString stringWithString:[[textViewDidActivate textStorage] string]] forKey:@"DidActivate"];
376 | [tmpDict setObject:[NSString stringWithString:[[textViewDidDeactivate textStorage] string]] forKey:@"DidDeactivate"];
377 |
378 | [tableDataSource replaceObjectAtIndex:selectedRow withObject:tmpDict];
379 |
380 | [self savePreferences];
381 | }
382 | }
383 |
384 |
385 | - (void)savePreferences
386 | {
387 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
388 |
389 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
390 | NSString *appSupportPath = [paths objectAtIndex:0];
391 | NSString *prefDir = [appSupportPath stringByAppendingPathComponent:@"info.yuriev.OnAppBehaviour"];
392 | NSString *prefPath = [prefDir stringByAppendingPathComponent:@"preferences.plist"];
393 |
394 | NSFileManager *fileManager = [NSFileManager defaultManager];
395 |
396 | [fileManager removeItemAtPath:prefDir error:NULL];
397 | [fileManager createDirectoryAtPath:prefDir withIntermediateDirectories:YES attributes:nil error:NULL];
398 |
399 | NSMutableArray *saveArray = [NSMutableArray arrayWithCapacity:[tableDataSource count]];
400 |
401 | for (int i = 0; i < [tableDataSource count]; i++)
402 | {
403 | NSDictionary *dict = [tableDataSource objectAtIndex:i];
404 |
405 | NSMutableDictionary *tmpDict = [NSMutableDictionary dictionaryWithDictionary:dict];
406 | NSString *path = [prefDir stringByAppendingPathComponent:[[tmpDict objectForKey:@"ID"] stringByAppendingPathExtension:@"png"]];
407 | [[[tmpDict objectForKey:@"icon"] PNGData] writeToFile:path atomically:YES];
408 | [tmpDict removeObjectForKey:@"icon"];
409 |
410 | [saveArray addObject:tmpDict];
411 | }
412 |
413 | [saveArray writeToFile:prefPath atomically:YES];
414 |
415 | [self helperNotify];
416 |
417 | [pool release];
418 | }
419 |
420 |
421 | - (void)loadPreferences
422 | {
423 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
424 | NSString *appSupportPath = [paths objectAtIndex:0];
425 | NSString *prefDir = [appSupportPath stringByAppendingPathComponent:@"info.yuriev.OnAppBehaviour"];
426 | NSString *prefPath = [prefDir stringByAppendingPathComponent:@"preferences.plist"];
427 |
428 | NSArray *tmpArray = [NSMutableArray arrayWithContentsOfFile:prefPath];
429 | if (!tmpArray) tmpArray = [NSArray array];
430 |
431 | tableDataSource = [[NSMutableArray alloc] initWithCapacity:100];
432 |
433 | for (int i = 0; i < [tmpArray count]; i++)
434 | {
435 | NSDictionary *dict = [tmpArray objectAtIndex:i];
436 |
437 | NSMutableDictionary *tmpDict = [NSMutableDictionary dictionaryWithDictionary:dict];
438 | NSString *path = [prefDir stringByAppendingPathComponent:[[tmpDict objectForKey:@"ID"] stringByAppendingPathExtension:@"png"]];
439 | NSImage *image = [[NSImage alloc] initWithContentsOfFile:path];
440 |
441 | if (image)
442 | {
443 | [tmpDict setObject:image forKey:@"icon"];
444 | [image release];
445 |
446 | [tableDataSource addObject:tmpDict];
447 | }
448 | }
449 | }
450 |
451 |
452 | #pragma mark -
453 | #pragma mark NSTableView Delegates
454 |
455 |
456 | - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
457 | {
458 | return [tableDataSource count];
459 | }
460 |
461 |
462 | - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row
463 | {
464 | return 44;
465 | }
466 |
467 | - (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
468 | {
469 | AppCell* cell = [[[AppCell alloc] init] autorelease];
470 | [cell setEditable:NO];
471 | cell.title = [[tableDataSource objectAtIndex:row] objectForKey:@"name"];
472 | cell.subtitle = [[tableDataSource objectAtIndex:row] objectForKey:@"ID"];
473 | cell.image = [[tableDataSource objectAtIndex:row] objectForKey:@"icon"];
474 |
475 | return cell;
476 | }
477 |
478 |
479 | - (void)tableViewSelectionDidChange:(NSNotification *)aNotification
480 | {
481 | [self setViewToRow:[appTable selectedRow]];
482 | }
483 |
484 |
485 | - (NSIndexSet *)tableView:(NSTableView *)tableView selectionIndexesForProposedSelection:(NSIndexSet *)proposedSelectionIndexes
486 | {
487 | [self saveCurrentData];
488 |
489 | return proposedSelectionIndexes;
490 | }
491 |
492 |
493 | #pragma mark -
494 | #pragma mark NSTextView Delegates
495 |
496 |
497 | - (void)textDidChange:(NSNotification *)aNotification
498 | {
499 | [NSObject cancelPreviousPerformRequestsWithTarget:self];
500 | [self performSelector:@selector(saveCurrentData) withObject:nil afterDelay:3.0];
501 |
502 | saved = NO;
503 | }
504 |
505 |
506 | #pragma mark -
507 |
508 | @end
509 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | DA0E7B31134EF2800063FEDD /* PopUpCell.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0E7B2F134EF27F0063FEDD /* PopUpCell.h */; };
11 | DA0E7B32134EF2800063FEDD /* PopUpCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0E7B30134EF27F0063FEDD /* PopUpCell.m */; };
12 | DA0E7B55134F1CD10063FEDD /* PopUpButton.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0E7B53134F1CD10063FEDD /* PopUpButton.h */; };
13 | DA0E7B56134F1CD10063FEDD /* PopUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0E7B54134F1CD10063FEDD /* PopUpButton.m */; };
14 | DA0E7B5F134F23570063FEDD /* Remove.png in Resources */ = {isa = PBXBuildFile; fileRef = DA0E7B5D134F23570063FEDD /* Remove.png */; };
15 | DA0E7B60134F23570063FEDD /* Add.png in Resources */ = {isa = PBXBuildFile; fileRef = DA0E7B5E134F23570063FEDD /* Add.png */; };
16 | DA121767134DB9C4006D208B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA121766134DB9C4006D208B /* Cocoa.framework */; };
17 | DA121769134DB9C4006D208B /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA121768134DB9C4006D208B /* PreferencePanes.framework */; };
18 | DA121773134DB9C4006D208B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA121771134DB9C4006D208B /* InfoPlist.strings */; };
19 | DA121776134DB9C4006D208B /* OnAppBehaviour.h in Headers */ = {isa = PBXBuildFile; fileRef = DA121775134DB9C4006D208B /* OnAppBehaviour.h */; };
20 | DA121778134DB9C4006D208B /* OnAppBehaviour.m in Sources */ = {isa = PBXBuildFile; fileRef = DA121777134DB9C4006D208B /* OnAppBehaviour.m */; };
21 | DA1217AB134DE9EB006D208B /* AppCell.h in Headers */ = {isa = PBXBuildFile; fileRef = DA1217A9134DE9EB006D208B /* AppCell.h */; };
22 | DA1217AC134DE9EB006D208B /* AppCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DA1217AA134DE9EB006D208B /* AppCell.m */; };
23 | DA53D41C134FF1CE00989E6F /* OnAppBehaviour.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA53D41D134FF1CE00989E6F /* OnAppBehaviour.xib */; };
24 | DA9EBE3313512F000071C309 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA9EBE3513512F000071C309 /* Localizable.strings */; };
25 | DAB6444C1352FFD200B70578 /* OnAppBehaviourHelper.app in Resources */ = {isa = PBXBuildFile; fileRef = DAB6444B1352FFD200B70578 /* OnAppBehaviourHelper.app */; };
26 | DABBA61B1352D86D006735C8 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = DABBA61A1352D86D006735C8 /* Icon.png */; };
27 | DABEFD06134FD0C800A5CF85 /* LoginItems.h in Headers */ = {isa = PBXBuildFile; fileRef = DABEFD04134FD0C800A5CF85 /* LoginItems.h */; };
28 | DABEFD07134FD0C800A5CF85 /* LoginItems.m in Sources */ = {isa = PBXBuildFile; fileRef = DABEFD05134FD0C800A5CF85 /* LoginItems.m */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXFileReference section */
32 | DA0E7B2F134EF27F0063FEDD /* PopUpCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopUpCell.h; sourceTree = ""; };
33 | DA0E7B30134EF27F0063FEDD /* PopUpCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopUpCell.m; sourceTree = ""; };
34 | DA0E7B53134F1CD10063FEDD /* PopUpButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopUpButton.h; sourceTree = ""; };
35 | DA0E7B54134F1CD10063FEDD /* PopUpButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopUpButton.m; sourceTree = ""; };
36 | DA0E7B5D134F23570063FEDD /* Remove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Remove.png; sourceTree = ""; };
37 | DA0E7B5E134F23570063FEDD /* Add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Add.png; sourceTree = ""; };
38 | DA121763134DB9C4006D208B /* OnAppBehaviour.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OnAppBehaviour.prefPane; sourceTree = BUILT_PRODUCTS_DIR; };
39 | DA121766134DB9C4006D208B /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
40 | DA121768134DB9C4006D208B /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = System/Library/Frameworks/PreferencePanes.framework; sourceTree = SDKROOT; };
41 | DA12176B134DB9C4006D208B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
42 | DA12176C134DB9C4006D208B /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
43 | DA12176D134DB9C4006D208B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
44 | DA121770134DB9C4006D208B /* OnAppBehaviour-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OnAppBehaviour-Info.plist"; sourceTree = ""; };
45 | DA121772134DB9C4006D208B /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
46 | DA121774134DB9C4006D208B /* OnAppBehaviour-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OnAppBehaviour-Prefix.pch"; sourceTree = ""; };
47 | DA121775134DB9C4006D208B /* OnAppBehaviour.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OnAppBehaviour.h; sourceTree = ""; };
48 | DA121777134DB9C4006D208B /* OnAppBehaviour.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OnAppBehaviour.m; sourceTree = ""; };
49 | DA1217A9134DE9EB006D208B /* AppCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppCell.h; sourceTree = ""; };
50 | DA1217AA134DE9EB006D208B /* AppCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppCell.m; sourceTree = ""; };
51 | DA53D41D134FF1CE00989E6F /* OnAppBehaviour.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OnAppBehaviour.xib; sourceTree = ""; };
52 | DA9EBE3413512F000071C309 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; };
53 | DA9EBE3813512FF40071C309 /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; };
54 | DAB6444B1352FFD200B70578 /* OnAppBehaviourHelper.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = OnAppBehaviourHelper.app; sourceTree = ""; };
55 | DABBA61A1352D86D006735C8 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; };
56 | DABEFD04134FD0C800A5CF85 /* LoginItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginItems.h; sourceTree = ""; };
57 | DABEFD05134FD0C800A5CF85 /* LoginItems.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginItems.m; sourceTree = ""; };
58 | DAFDA4221352EF8B00E529FA /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | DA12175E134DB9C4006D208B /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | DA121767134DB9C4006D208B /* Cocoa.framework in Frameworks */,
67 | DA121769134DB9C4006D208B /* PreferencePanes.framework in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | /* End PBXFrameworksBuildPhase section */
72 |
73 | /* Begin PBXGroup section */
74 | DA121756134DB9C4006D208B = {
75 | isa = PBXGroup;
76 | children = (
77 | DA12176E134DB9C4006D208B /* OnAppBehaviour */,
78 | DA121765134DB9C4006D208B /* Frameworks */,
79 | DA121764134DB9C4006D208B /* Products */,
80 | );
81 | sourceTree = "";
82 | };
83 | DA121764134DB9C4006D208B /* Products */ = {
84 | isa = PBXGroup;
85 | children = (
86 | DA121763134DB9C4006D208B /* OnAppBehaviour.prefPane */,
87 | );
88 | name = Products;
89 | sourceTree = "";
90 | };
91 | DA121765134DB9C4006D208B /* Frameworks */ = {
92 | isa = PBXGroup;
93 | children = (
94 | DA121766134DB9C4006D208B /* Cocoa.framework */,
95 | DA121768134DB9C4006D208B /* PreferencePanes.framework */,
96 | DA12176A134DB9C4006D208B /* Other Frameworks */,
97 | );
98 | name = Frameworks;
99 | sourceTree = "";
100 | };
101 | DA12176A134DB9C4006D208B /* Other Frameworks */ = {
102 | isa = PBXGroup;
103 | children = (
104 | DA12176B134DB9C4006D208B /* AppKit.framework */,
105 | DA12176C134DB9C4006D208B /* CoreData.framework */,
106 | DA12176D134DB9C4006D208B /* Foundation.framework */,
107 | );
108 | name = "Other Frameworks";
109 | sourceTree = "";
110 | };
111 | DA12176E134DB9C4006D208B /* OnAppBehaviour */ = {
112 | isa = PBXGroup;
113 | children = (
114 | DA121775134DB9C4006D208B /* OnAppBehaviour.h */,
115 | DA121777134DB9C4006D208B /* OnAppBehaviour.m */,
116 | DA1217A9134DE9EB006D208B /* AppCell.h */,
117 | DA1217AA134DE9EB006D208B /* AppCell.m */,
118 | DA0E7B2F134EF27F0063FEDD /* PopUpCell.h */,
119 | DA0E7B30134EF27F0063FEDD /* PopUpCell.m */,
120 | DA0E7B53134F1CD10063FEDD /* PopUpButton.h */,
121 | DA0E7B54134F1CD10063FEDD /* PopUpButton.m */,
122 | DABEFD04134FD0C800A5CF85 /* LoginItems.h */,
123 | DABEFD05134FD0C800A5CF85 /* LoginItems.m */,
124 | DA53D41D134FF1CE00989E6F /* OnAppBehaviour.xib */,
125 | DA12176F134DB9C4006D208B /* Supporting Files */,
126 | );
127 | path = OnAppBehaviour;
128 | sourceTree = "";
129 | };
130 | DA12176F134DB9C4006D208B /* Supporting Files */ = {
131 | isa = PBXGroup;
132 | children = (
133 | DAFDA4261352FC3D00E529FA /* Helper */,
134 | DA121783134DBAFE006D208B /* Images */,
135 | DA121770134DB9C4006D208B /* OnAppBehaviour-Info.plist */,
136 | DA121771134DB9C4006D208B /* InfoPlist.strings */,
137 | DA121774134DB9C4006D208B /* OnAppBehaviour-Prefix.pch */,
138 | DA9EBE3513512F000071C309 /* Localizable.strings */,
139 | );
140 | name = "Supporting Files";
141 | sourceTree = "";
142 | };
143 | DA121783134DBAFE006D208B /* Images */ = {
144 | isa = PBXGroup;
145 | children = (
146 | DABBA61A1352D86D006735C8 /* Icon.png */,
147 | DA0E7B5D134F23570063FEDD /* Remove.png */,
148 | DA0E7B5E134F23570063FEDD /* Add.png */,
149 | );
150 | name = Images;
151 | sourceTree = "";
152 | };
153 | DAFDA4261352FC3D00E529FA /* Helper */ = {
154 | isa = PBXGroup;
155 | children = (
156 | DAB6444B1352FFD200B70578 /* OnAppBehaviourHelper.app */,
157 | );
158 | name = Helper;
159 | sourceTree = "";
160 | };
161 | /* End PBXGroup section */
162 |
163 | /* Begin PBXHeadersBuildPhase section */
164 | DA12175F134DB9C4006D208B /* Headers */ = {
165 | isa = PBXHeadersBuildPhase;
166 | buildActionMask = 2147483647;
167 | files = (
168 | DA121776134DB9C4006D208B /* OnAppBehaviour.h in Headers */,
169 | DA1217AB134DE9EB006D208B /* AppCell.h in Headers */,
170 | DA0E7B31134EF2800063FEDD /* PopUpCell.h in Headers */,
171 | DA0E7B55134F1CD10063FEDD /* PopUpButton.h in Headers */,
172 | DABEFD06134FD0C800A5CF85 /* LoginItems.h in Headers */,
173 | );
174 | runOnlyForDeploymentPostprocessing = 0;
175 | };
176 | /* End PBXHeadersBuildPhase section */
177 |
178 | /* Begin PBXNativeTarget section */
179 | DA121762134DB9C4006D208B /* OnAppBehaviour */ = {
180 | isa = PBXNativeTarget;
181 | buildConfigurationList = DA121780134DB9C4006D208B /* Build configuration list for PBXNativeTarget "OnAppBehaviour" */;
182 | buildPhases = (
183 | DA12175D134DB9C4006D208B /* Sources */,
184 | DA12175E134DB9C4006D208B /* Frameworks */,
185 | DA12175F134DB9C4006D208B /* Headers */,
186 | DA121760134DB9C4006D208B /* Resources */,
187 | DA121761134DB9C4006D208B /* Rez */,
188 | );
189 | buildRules = (
190 | );
191 | dependencies = (
192 | );
193 | name = OnAppBehaviour;
194 | productName = OnAppBehaviour;
195 | productReference = DA121763134DB9C4006D208B /* OnAppBehaviour.prefPane */;
196 | productType = "com.apple.product-type.bundle";
197 | };
198 | /* End PBXNativeTarget section */
199 |
200 | /* Begin PBXProject section */
201 | DA121758134DB9C4006D208B /* Project object */ = {
202 | isa = PBXProject;
203 | buildConfigurationList = DA12175B134DB9C4006D208B /* Build configuration list for PBXProject "OnAppBehaviour" */;
204 | compatibilityVersion = "Xcode 3.2";
205 | developmentRegion = English;
206 | hasScannedForEncodings = 0;
207 | knownRegions = (
208 | en,
209 | ru,
210 | );
211 | mainGroup = DA121756134DB9C4006D208B;
212 | productRefGroup = DA121764134DB9C4006D208B /* Products */;
213 | projectDirPath = "";
214 | projectRoot = "";
215 | targets = (
216 | DA121762134DB9C4006D208B /* OnAppBehaviour */,
217 | );
218 | };
219 | /* End PBXProject section */
220 |
221 | /* Begin PBXResourcesBuildPhase section */
222 | DA121760134DB9C4006D208B /* Resources */ = {
223 | isa = PBXResourcesBuildPhase;
224 | buildActionMask = 2147483647;
225 | files = (
226 | DA121773134DB9C4006D208B /* InfoPlist.strings in Resources */,
227 | DA53D41C134FF1CE00989E6F /* OnAppBehaviour.xib in Resources */,
228 | DA0E7B5F134F23570063FEDD /* Remove.png in Resources */,
229 | DA0E7B60134F23570063FEDD /* Add.png in Resources */,
230 | DA9EBE3313512F000071C309 /* Localizable.strings in Resources */,
231 | DABBA61B1352D86D006735C8 /* Icon.png in Resources */,
232 | DAB6444C1352FFD200B70578 /* OnAppBehaviourHelper.app in Resources */,
233 | );
234 | runOnlyForDeploymentPostprocessing = 0;
235 | };
236 | /* End PBXResourcesBuildPhase section */
237 |
238 | /* Begin PBXRezBuildPhase section */
239 | DA121761134DB9C4006D208B /* Rez */ = {
240 | isa = PBXRezBuildPhase;
241 | buildActionMask = 2147483647;
242 | files = (
243 | );
244 | runOnlyForDeploymentPostprocessing = 0;
245 | };
246 | /* End PBXRezBuildPhase section */
247 |
248 | /* Begin PBXSourcesBuildPhase section */
249 | DA12175D134DB9C4006D208B /* Sources */ = {
250 | isa = PBXSourcesBuildPhase;
251 | buildActionMask = 2147483647;
252 | files = (
253 | DA121778134DB9C4006D208B /* OnAppBehaviour.m in Sources */,
254 | DA1217AC134DE9EB006D208B /* AppCell.m in Sources */,
255 | DA0E7B32134EF2800063FEDD /* PopUpCell.m in Sources */,
256 | DA0E7B56134F1CD10063FEDD /* PopUpButton.m in Sources */,
257 | DABEFD07134FD0C800A5CF85 /* LoginItems.m in Sources */,
258 | );
259 | runOnlyForDeploymentPostprocessing = 0;
260 | };
261 | /* End PBXSourcesBuildPhase section */
262 |
263 | /* Begin PBXVariantGroup section */
264 | DA121771134DB9C4006D208B /* InfoPlist.strings */ = {
265 | isa = PBXVariantGroup;
266 | children = (
267 | DA121772134DB9C4006D208B /* en */,
268 | DA9EBE3813512FF40071C309 /* ru */,
269 | );
270 | name = InfoPlist.strings;
271 | sourceTree = "";
272 | };
273 | DA9EBE3513512F000071C309 /* Localizable.strings */ = {
274 | isa = PBXVariantGroup;
275 | children = (
276 | DA9EBE3413512F000071C309 /* en */,
277 | DAFDA4221352EF8B00E529FA /* ru */,
278 | );
279 | name = Localizable.strings;
280 | sourceTree = "";
281 | };
282 | /* End PBXVariantGroup section */
283 |
284 | /* Begin XCBuildConfiguration section */
285 | DA12177E134DB9C4006D208B /* Debug */ = {
286 | isa = XCBuildConfiguration;
287 | buildSettings = {
288 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
289 | GCC_C_LANGUAGE_STANDARD = gnu99;
290 | GCC_ENABLE_OBJC_GC = supported;
291 | GCC_OPTIMIZATION_LEVEL = 0;
292 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
293 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
294 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
295 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
296 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
297 | GCC_WARN_UNUSED_VARIABLE = YES;
298 | MACOSX_DEPLOYMENT_TARGET = 10.6;
299 | ONLY_ACTIVE_ARCH = YES;
300 | SDKROOT = macosx;
301 | };
302 | name = Debug;
303 | };
304 | DA12177F134DB9C4006D208B /* Release */ = {
305 | isa = XCBuildConfiguration;
306 | buildSettings = {
307 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
308 | GCC_C_LANGUAGE_STANDARD = gnu99;
309 | GCC_ENABLE_OBJC_GC = supported;
310 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
312 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
313 | GCC_WARN_UNUSED_VARIABLE = YES;
314 | MACOSX_DEPLOYMENT_TARGET = 10.6;
315 | SDKROOT = macosx;
316 | };
317 | name = Release;
318 | };
319 | DA121781134DB9C4006D208B /* Debug */ = {
320 | isa = XCBuildConfiguration;
321 | buildSettings = {
322 | ALWAYS_SEARCH_USER_PATHS = NO;
323 | COPY_PHASE_STRIP = NO;
324 | GCC_DYNAMIC_NO_PIC = NO;
325 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
326 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
327 | GCC_PREFIX_HEADER = "OnAppBehaviour/OnAppBehaviour-Prefix.pch";
328 | INFOPLIST_FILE = "OnAppBehaviour/OnAppBehaviour-Info.plist";
329 | INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
330 | PRODUCT_NAME = "$(TARGET_NAME)";
331 | WRAPPER_EXTENSION = prefPane;
332 | };
333 | name = Debug;
334 | };
335 | DA121782134DB9C4006D208B /* Release */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | ALWAYS_SEARCH_USER_PATHS = NO;
339 | COPY_PHASE_STRIP = YES;
340 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
341 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
342 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
343 | GCC_PREFIX_HEADER = "OnAppBehaviour/OnAppBehaviour-Prefix.pch";
344 | INFOPLIST_FILE = "OnAppBehaviour/OnAppBehaviour-Info.plist";
345 | INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
346 | PRODUCT_NAME = "$(TARGET_NAME)";
347 | WRAPPER_EXTENSION = prefPane;
348 | };
349 | name = Release;
350 | };
351 | /* End XCBuildConfiguration section */
352 |
353 | /* Begin XCConfigurationList section */
354 | DA12175B134DB9C4006D208B /* Build configuration list for PBXProject "OnAppBehaviour" */ = {
355 | isa = XCConfigurationList;
356 | buildConfigurations = (
357 | DA12177E134DB9C4006D208B /* Debug */,
358 | DA12177F134DB9C4006D208B /* Release */,
359 | );
360 | defaultConfigurationIsVisible = 0;
361 | defaultConfigurationName = Release;
362 | };
363 | DA121780134DB9C4006D208B /* Build configuration list for PBXNativeTarget "OnAppBehaviour" */ = {
364 | isa = XCConfigurationList;
365 | buildConfigurations = (
366 | DA121781134DB9C4006D208B /* Debug */,
367 | DA121782134DB9C4006D208B /* Release */,
368 | );
369 | defaultConfigurationIsVisible = 0;
370 | defaultConfigurationName = Release;
371 | };
372 | /* End XCConfigurationList section */
373 | };
374 | rootObject = DA121758134DB9C4006D208B /* Project object */;
375 | }
376 |
--------------------------------------------------------------------------------
/OnAppBehaviour/OnAppBehaviour/OnAppBehaviour.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1060
5 | 10J869
6 | 1305
7 | 1038.35
8 | 461.00
9 |
10 | com.apple.InterfaceBuilder.CocoaPlugin
11 | 1305
12 |
13 |
14 | NSScroller
15 | NSTableHeaderView
16 | NSScrollView
17 | NSTextFieldCell
18 | NSBox
19 | NSTableView
20 | NSCustomObject
21 | NSTextView
22 | NSView
23 | NSWindowTemplate
24 | NSTextField
25 | NSTableColumn
26 |
27 |
28 | com.apple.InterfaceBuilder.CocoaPlugin
29 |
30 |
31 |
32 |
33 | OnAppBehaviour
34 |
35 |
36 | FirstResponder
37 |
38 |
39 | NSApplication
40 |
41 |
42 | 7
43 | 2
44 | {{0, 0}, {668, 460}}
45 | 1081606144
46 | << do not localize >>
47 | NSWindow
48 |
49 | View
50 |
51 |
52 |
53 | 256
54 |
55 |
56 |
57 | 268
58 |
59 |
60 |
61 | 2304
62 |
63 |
64 |
65 | 4352
66 | {212, 380}
67 |
68 |
69 |
70 | YES
71 |
80 |
81 |
82 | -2147483392
83 | {{198, 0}, {16, 17}}
84 |
85 |
86 |
87 |
88 |
89 |
90 | 209
91 | 40
92 | 1000
93 |
116 |
117 | 69336641
118 | 6144
119 | Text Cell
120 |
121 | LucidaGrande
122 | 13
123 | 1044
124 |
125 |
126 |
127 | 6
128 | System
129 | controlBackgroundColor
130 |
131 | 3
132 | MC42NjY2NjY2NjY3AA
133 |
134 |
135 |
136 | 6
137 | System
138 | controlTextColor
139 |
140 |
141 |
142 | 3
143 | YES
144 |
145 |
146 |
147 | 3
148 | 2
149 |
150 | 3
151 | MQA
152 |
153 |
154 | 6
155 | System
156 | gridColor
157 |
158 | 3
159 | MC41AA
160 |
161 |
162 | 17
163 | 314572800
164 |
165 |
166 | 4
167 | 15
168 | 0
169 | NO
170 | 0
171 |
172 |
173 | {{1, 17}, {212, 380}}
174 |
175 |
176 |
177 |
178 |
179 | 6
180 |
181 |
182 |
183 | -2147483392
184 | {{198, 17}, {15, 380}}
185 |
186 |
187 |
188 |
189 | _doScroller:
190 | 37
191 | 0.1947367936372757
192 |
193 |
194 |
195 | -2147483392
196 | {{-100, -100}, {223, 15}}
197 |
198 |
199 |
200 | 1
201 |
202 | _doScroller:
203 | 0.57142859697341919
204 |
205 |
206 |
207 | 2304
208 |
209 |
210 |
211 | {{1, 0}, {212, 17}}
212 |
213 |
214 |
215 |
216 |
217 | 4
218 |
219 |
220 |
221 | {{20, 42}, {214, 398}}
222 |
223 |
224 |
225 | 530
226 |
227 |
228 |
229 |
230 |
231 | QSAAAEEgAABBmAAAQZgAAA
232 |
233 |
234 |
235 | 12
236 |
237 |
238 |
239 | 256
240 |
241 |
242 |
243 | 256
244 |
245 |
246 |
247 | 2304
248 |
249 |
250 |
251 | 2322
252 |
253 | Apple HTML pasteboard type
254 | Apple PDF pasteboard type
255 | Apple PICT pasteboard type
256 | Apple PNG pasteboard type
257 | Apple URL pasteboard type
258 | CorePasteboardFlavorType 0x6D6F6F76
259 | NSColor pasteboard type
260 | NSFilenamesPboardType
261 | NSStringPboardType
262 | NeXT Encapsulated PostScript v1.2 pasteboard type
263 | NeXT RTFD pasteboard type
264 | NeXT Rich Text Format v1.0 pasteboard type
265 | NeXT TIFF v4.0 pasteboard type
266 | NeXT font pasteboard type
267 | NeXT ruler pasteboard type
268 | WebURLsWithTitlesPboardType
269 | public.url
270 |
271 | {{0, -11}, {365, 14}}
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 | 134
287 |
288 |
289 |
290 | 365
291 | 1
292 |
293 |
294 | 3843
295 | 0
296 |
297 |
298 |
299 |
300 | 6
301 | System
302 | selectedTextBackgroundColor
303 |
304 |
305 |
306 | 6
307 | System
308 | selectedTextColor
309 |
310 |
311 |
312 |
313 |
314 |
315 | 1
316 | MCAwIDEAA
317 |
318 |
319 | {8, -8}
320 | 13
321 |
322 |
323 |
324 |
325 |
326 | 6
327 | {463, 1e+07}
328 | {213, 2}
329 |
330 |
331 |
332 | {{1, 1}, {365, 38}}
333 |
334 |
335 |
336 |
337 |
338 |
339 | {4, -5}
340 | 1
341 |
342 | 4
343 |
344 |
345 |
346 | -2147483392
347 | {{216, 1}, {15, 58}}
348 |
349 |
350 |
351 |
352 | _doScroller:
353 | 1
354 | 0.85256409645080566
355 |
356 |
357 |
358 | -2147483392
359 | {{-100, -100}, {87, 18}}
360 |
361 |
362 |
363 | 1
364 |
365 | _doScroller:
366 | 1
367 | 0.94565218687057495
368 |
369 |
370 | {{18, 354}, {367, 40}}
371 |
372 |
373 |
374 | 530
375 |
376 |
377 |
378 |
379 |
380 |
381 | 268
382 | {{15, 395}, {373, 17}}
383 |
384 |
385 |
386 | YES
387 |
388 | 68288064
389 | 272630784
390 | << do not localize >>
391 |
392 |
393 |
394 | 6
395 | System
396 | controlColor
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 | 256
405 |
406 |
407 |
408 | 2304
409 |
410 |
411 |
412 | 2322
413 |
414 | Apple HTML pasteboard type
415 | Apple PDF pasteboard type
416 | Apple PICT pasteboard type
417 | Apple PNG pasteboard type
418 | Apple URL pasteboard type
419 | CorePasteboardFlavorType 0x6D6F6F76
420 | NSColor pasteboard type
421 | NSFilenamesPboardType
422 | NSStringPboardType
423 | NeXT Encapsulated PostScript v1.2 pasteboard type
424 | NeXT RTFD pasteboard type
425 | NeXT Rich Text Format v1.0 pasteboard type
426 | NeXT TIFF v4.0 pasteboard type
427 | NeXT font pasteboard type
428 | NeXT ruler pasteboard type
429 | WebURLsWithTitlesPboardType
430 | public.url
431 |
432 | {{0, -11}, {365, 14}}
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 | 134
448 |
449 |
450 |
451 | 365
452 | 1
453 |
454 |
455 | 3843
456 | 0
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 | 6
472 | {463, 1e+07}
473 | {213, 2}
474 |
475 |
476 |
477 | {{1, 1}, {365, 38}}
478 |
479 |
480 |
481 |
482 |
483 |
484 | 4
485 |
486 |
487 |
488 | -2147483392
489 | {{216, 1}, {15, 58}}
490 |
491 |
492 |
493 |
494 | _doScroller:
495 | 1
496 | 0.85256409645080566
497 |
498 |
499 |
500 | -2147483392
501 | {{-100, -100}, {87, 18}}
502 |
503 |
504 |
505 | 1
506 |
507 | _doScroller:
508 | 1
509 | 0.94565218687057495
510 |
511 |
512 | {{18, 288}, {367, 40}}
513 |
514 |
515 |
516 | 530
517 |
518 |
519 |
520 |
521 |
522 |
523 | 268
524 | {{15, 329}, {373, 17}}
525 |
526 |
527 |
528 | YES
529 |
530 | 68288064
531 | 272630784
532 | << do not localize >>
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 | 256
542 |
543 |
544 |
545 | 2304
546 |
547 |
548 |
549 | 2322
550 |
551 | Apple HTML pasteboard type
552 | Apple PDF pasteboard type
553 | Apple PICT pasteboard type
554 | Apple PNG pasteboard type
555 | Apple URL pasteboard type
556 | CorePasteboardFlavorType 0x6D6F6F76
557 | NSColor pasteboard type
558 | NSFilenamesPboardType
559 | NSStringPboardType
560 | NeXT Encapsulated PostScript v1.2 pasteboard type
561 | NeXT RTFD pasteboard type
562 | NeXT Rich Text Format v1.0 pasteboard type
563 | NeXT TIFF v4.0 pasteboard type
564 | NeXT font pasteboard type
565 | NeXT ruler pasteboard type
566 | WebURLsWithTitlesPboardType
567 | public.url
568 |
569 | {{0, -11}, {365, 14}}
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 | 134
585 |
586 |
587 |
588 | 365
589 | 1
590 |
591 |
592 | 3843
593 | 0
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 | 6
609 | {463, 1e+07}
610 | {213, 2}
611 |
612 |
613 |
614 | {{1, 1}, {365, 38}}
615 |
616 |
617 |
618 |
619 |
620 |
621 | 4
622 |
623 |
624 |
625 | -2147483392
626 | {{216, 1}, {15, 58}}
627 |
628 |
629 |
630 |
631 | _doScroller:
632 | 1
633 | 0.85256409645080566
634 |
635 |
636 |
637 | -2147483392
638 | {{-100, -100}, {87, 18}}
639 |
640 |
641 |
642 | 1
643 |
644 | _doScroller:
645 | 1
646 | 0.94565218687057495
647 |
648 |
649 | {{18, 222}, {367, 40}}
650 |
651 |
652 |
653 | 530
654 |
655 |
656 |
657 |
658 |
659 |
660 | 268
661 | {{15, 263}, {373, 17}}
662 |
663 |
664 |
665 | YES
666 |
667 | 68288064
668 | 272630784
669 | << do not localize >>
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 | 256
679 |
680 |
681 |
682 | 2304
683 |
684 |
685 |
686 | 2322
687 |
688 | Apple HTML pasteboard type
689 | Apple PDF pasteboard type
690 | Apple PICT pasteboard type
691 | Apple PNG pasteboard type
692 | Apple URL pasteboard type
693 | CorePasteboardFlavorType 0x6D6F6F76
694 | NSColor pasteboard type
695 | NSFilenamesPboardType
696 | NSStringPboardType
697 | NeXT Encapsulated PostScript v1.2 pasteboard type
698 | NeXT RTFD pasteboard type
699 | NeXT Rich Text Format v1.0 pasteboard type
700 | NeXT TIFF v4.0 pasteboard type
701 | NeXT font pasteboard type
702 | NeXT ruler pasteboard type
703 | WebURLsWithTitlesPboardType
704 | public.url
705 |
706 | {{0, -11}, {365, 14}}
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 | 134
722 |
723 |
724 |
725 | 365
726 | 1
727 |
728 |
729 | 3843
730 | 0
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 | 6
746 | {463, 1e+07}
747 | {213, 2}
748 |
749 |
750 |
751 | {{1, 1}, {365, 38}}
752 |
753 |
754 |
755 |
756 |
757 |
758 | 4
759 |
760 |
761 |
762 | -2147483392
763 | {{216, 1}, {15, 58}}
764 |
765 |
766 |
767 |
768 | _doScroller:
769 | 1
770 | 0.85256409645080566
771 |
772 |
773 |
774 | -2147483392
775 | {{-100, -100}, {87, 18}}
776 |
777 |
778 |
779 | 1
780 |
781 | _doScroller:
782 | 1
783 | 0.94565218687057495
784 |
785 |
786 | {{18, 156}, {367, 40}}
787 |
788 |
789 |
790 | 530
791 |
792 |
793 |
794 |
795 |
796 |
797 | 268
798 | {{15, 197}, {373, 17}}
799 |
800 |
801 |
802 | YES
803 |
804 | 68288064
805 | 272630784
806 | << do not localize >>
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 | 256
816 |
817 |
818 |
819 | 2304
820 |
821 |
822 |
823 | 2322
824 |
825 | Apple HTML pasteboard type
826 | Apple PDF pasteboard type
827 | Apple PICT pasteboard type
828 | Apple PNG pasteboard type
829 | Apple URL pasteboard type
830 | CorePasteboardFlavorType 0x6D6F6F76
831 | NSColor pasteboard type
832 | NSFilenamesPboardType
833 | NSStringPboardType
834 | NeXT Encapsulated PostScript v1.2 pasteboard type
835 | NeXT RTFD pasteboard type
836 | NeXT Rich Text Format v1.0 pasteboard type
837 | NeXT TIFF v4.0 pasteboard type
838 | NeXT font pasteboard type
839 | NeXT ruler pasteboard type
840 | WebURLsWithTitlesPboardType
841 | public.url
842 |
843 | {{0, -11}, {365, 14}}
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 | 134
859 |
860 |
861 |
862 | 365
863 | 1
864 |
865 |
866 | 3843
867 | 0
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 | 6
883 | {463, 1e+07}
884 | {213, 2}
885 |
886 |
887 |
888 | {{1, 1}, {365, 38}}
889 |
890 |
891 |
892 |
893 |
894 |
895 | 4
896 |
897 |
898 |
899 | -2147483392
900 | {{216, 1}, {15, 58}}
901 |
902 |
903 |
904 |
905 | _doScroller:
906 | 1
907 | 0.85256409645080566
908 |
909 |
910 |
911 | -2147483392
912 | {{-100, -100}, {87, 18}}
913 |
914 |
915 |
916 | 1
917 |
918 | _doScroller:
919 | 1
920 | 0.94565218687057495
921 |
922 |
923 | {{18, 22}, {367, 40}}
924 |
925 |
926 |
927 | 530
928 |
929 |
930 |
931 |
932 |
933 |
934 | 268
935 | {{15, 64}, {373, 17}}
936 |
937 |
938 |
939 | YES
940 |
941 | 68288064
942 | 272630784
943 | << do not localize >>
944 |
945 |
946 |
947 |
948 |
949 |
950 |
951 |
952 | 256
953 |
954 |
955 |
956 | 2304
957 |
958 |
959 |
960 | 2322
961 |
962 | Apple HTML pasteboard type
963 | Apple PDF pasteboard type
964 | Apple PICT pasteboard type
965 | Apple PNG pasteboard type
966 | Apple URL pasteboard type
967 | CorePasteboardFlavorType 0x6D6F6F76
968 | NSColor pasteboard type
969 | NSFilenamesPboardType
970 | NSStringPboardType
971 | NeXT Encapsulated PostScript v1.2 pasteboard type
972 | NeXT RTFD pasteboard type
973 | NeXT Rich Text Format v1.0 pasteboard type
974 | NeXT TIFF v4.0 pasteboard type
975 | NeXT font pasteboard type
976 | NeXT ruler pasteboard type
977 | WebURLsWithTitlesPboardType
978 | public.url
979 |
980 | {{0, -11}, {365, 14}}
981 |
982 |
983 |
984 |
985 |
986 |
987 |
988 |
989 |
990 |
991 |
992 |
993 |
994 |
995 | 134
996 |
997 |
998 |
999 | 365
1000 | 1
1001 |
1002 |
1003 | 3843
1004 | 0
1005 |
1006 |
1007 |
1008 |
1009 |
1010 |
1011 |
1012 |
1013 |
1014 |
1015 |
1016 |
1017 |
1018 |
1019 | 6
1020 | {463, 1e+07}
1021 | {213, 2}
1022 |
1023 |
1024 |
1025 | {{1, 1}, {365, 38}}
1026 |
1027 |
1028 |
1029 |
1030 |
1031 |
1032 | 4
1033 |
1034 |
1035 |
1036 | -2147483392
1037 | {{216, 1}, {15, 58}}
1038 |
1039 |
1040 |
1041 | _doScroller:
1042 | 1
1043 | 0.85256409645080566
1044 |
1045 |
1046 |
1047 | -2147483392
1048 | {{-100, -100}, {87, 18}}
1049 |
1050 |
1051 |
1052 | 1
1053 |
1054 | _doScroller:
1055 | 1
1056 | 0.94565218687057495
1057 |
1058 |
1059 | {{18, 89}, {367, 40}}
1060 |
1061 |
1062 |
1063 | 530
1064 |
1065 |
1066 |
1067 |
1068 |
1069 |
1070 | 268
1071 | {{15, 131}, {373, 17}}
1072 |
1073 |
1074 |
1075 | YES
1076 |
1077 | 68288064
1078 | 272630784
1079 | << do not localize >>
1080 |
1081 |
1082 |
1083 |
1084 |
1085 |
1086 |
1087 |
1088 | 268
1089 | {{15, 202}, {373, 19}}
1090 |
1091 |
1092 |
1093 | YES
1094 |
1095 | 68288064
1096 | 138413056
1097 | << do not localize >>
1098 |
1099 | LucidaGrande
1100 | 16
1101 | 16
1102 |
1103 |
1104 |
1105 |
1106 | 6
1107 | System
1108 | disabledControlTextColor
1109 |
1110 | 3
1111 | MC4zMzMzMzMzMzMzAA
1112 |
1113 |
1114 |
1115 |
1116 |
1117 | {{1, 1}, {403, 424}}
1118 |
1119 |
1120 |
1121 |
1122 |
1123 | {{246, 16}, {405, 426}}
1124 |
1125 |
1126 |
1127 | {0, 0}
1128 |
1129 | 67239424
1130 | 0
1131 |
1132 |
1133 |
1134 | 6
1135 | System
1136 | textBackgroundColor
1137 |
1138 |
1139 |
1140 | 3
1141 | MCAwLjgwMDAwMDAxMTkAA
1142 |
1143 |
1144 |
1145 | 1
1146 | 0
1147 | 0
1148 | NO
1149 |
1150 |
1151 | {{7, 11}, {668, 460}}
1152 |
1153 |
1154 |
1155 |
1156 | {{0, 0}, {1920, 1058}}
1157 | {1e+13, 1e+13}
1158 |
1159 |
1160 |
1161 |
1162 |
1163 |
1164 | _window
1165 |
1166 |
1167 |
1168 | 26
1169 |
1170 |
1171 |
1172 | textFieldDidLaunch
1173 |
1174 |
1175 |
1176 | 206
1177 |
1178 |
1179 |
1180 | textFieldDidTerminate
1181 |
1182 |
1183 |
1184 | 207
1185 |
1186 |
1187 |
1188 | textFieldDidActivate
1189 |
1190 |
1191 |
1192 | 208
1193 |
1194 |
1195 |
1196 | textFieldDidDeactivate
1197 |
1198 |
1199 |
1200 | 209
1201 |
1202 |
1203 |
1204 | textFieldDidHide
1205 |
1206 |
1207 |
1208 | 210
1209 |
1210 |
1211 |
1212 | textFieldDidUnhide
1213 |
1214 |
1215 |
1216 | 211
1217 |
1218 |
1219 |
1220 | textViewDidLaunch
1221 |
1222 |
1223 |
1224 | 216
1225 |
1226 |
1227 |
1228 | textViewDidTerminate
1229 |
1230 |
1231 |
1232 | 217
1233 |
1234 |
1235 |
1236 | textViewDidActivate
1237 |
1238 |
1239 |
1240 | 218
1241 |
1242 |
1243 |
1244 | textViewDidDeactivate
1245 |
1246 |
1247 |
1248 | 219
1249 |
1250 |
1251 |
1252 | textViewDidHide
1253 |
1254 |
1255 |
1256 | 220
1257 |
1258 |
1259 |
1260 | textViewDidUnhide
1261 |
1262 |
1263 |
1264 | 221
1265 |
1266 |
1267 |
1268 | dataSource
1269 |
1270 |
1271 |
1272 | 222
1273 |
1274 |
1275 |
1276 | delegate
1277 |
1278 |
1279 |
1280 | 223
1281 |
1282 |
1283 |
1284 | appList
1285 |
1286 |
1287 |
1288 | 224
1289 |
1290 |
1291 |
1292 | appTable
1293 |
1294 |
1295 |
1296 | 229
1297 |
1298 |
1299 |
1300 | textFieldInfo
1301 |
1302 |
1303 |
1304 | 232
1305 |
1306 |
1307 |
1308 | delegate
1309 |
1310 |
1311 |
1312 | 235
1313 |
1314 |
1315 |
1316 | delegate
1317 |
1318 |
1319 |
1320 | 236
1321 |
1322 |
1323 |
1324 | delegate
1325 |
1326 |
1327 |
1328 | 237
1329 |
1330 |
1331 |
1332 | delegate
1333 |
1334 |
1335 |
1336 | 238
1337 |
1338 |
1339 |
1340 | delegate
1341 |
1342 |
1343 |
1344 | 239
1345 |
1346 |
1347 |
1348 | delegate
1349 |
1350 |
1351 |
1352 | 240
1353 |
1354 |
1355 |
1356 |
1357 |
1358 | 0
1359 |
1360 |
1361 |
1362 |
1363 |
1364 | -2
1365 |
1366 |
1367 | File's Owner
1368 |
1369 |
1370 | -1
1371 |
1372 |
1373 | First Responder
1374 |
1375 |
1376 | 12
1377 |
1378 |
1379 |
1380 |
1381 |
1382 | PrefPane
1383 |
1384 |
1385 | 6
1386 |
1387 |
1388 |
1389 |
1390 |
1391 |
1392 |
1393 |
1394 | -3
1395 |
1396 |
1397 | Application
1398 |
1399 |
1400 | 101
1401 |
1402 |
1403 |
1404 |
1405 |
1406 |
1407 |
1408 |
1409 |
1410 |
1411 | 102
1412 |
1413 |
1414 |
1415 |
1416 | 103
1417 |
1418 |
1419 |
1420 |
1421 | 104
1422 |
1423 |
1424 |
1425 |
1426 | 105
1427 |
1428 |
1429 |
1430 |
1431 |
1432 |
1433 |
1434 | 106
1435 |
1436 |
1437 |
1438 |
1439 |
1440 |
1441 |
1442 | 109
1443 |
1444 |
1445 |
1446 |
1447 | 126
1448 |
1449 |
1450 |
1451 |
1452 |
1453 |
1454 |
1455 |
1456 |
1457 |
1458 |
1459 |
1460 |
1461 |
1462 |
1463 |
1464 |
1465 |
1466 |
1467 | 131
1468 |
1469 |
1470 |
1471 |
1472 |
1473 |
1474 |
1475 | 132
1476 |
1477 |
1478 |
1479 |
1480 | 157
1481 |
1482 |
1483 |
1484 |
1485 |
1486 |
1487 |
1488 |
1489 |
1490 | 158
1491 |
1492 |
1493 |
1494 |
1495 |
1496 |
1497 |
1498 | 159
1499 |
1500 |
1501 |
1502 |
1503 | 160
1504 |
1505 |
1506 |
1507 |
1508 | 161
1509 |
1510 |
1511 |
1512 |
1513 | 162
1514 |
1515 |
1516 |
1517 |
1518 | 176
1519 |
1520 |
1521 |
1522 |
1523 |
1524 |
1525 |
1526 |
1527 |
1528 | 177
1529 |
1530 |
1531 |
1532 |
1533 |
1534 |
1535 |
1536 | 178
1537 |
1538 |
1539 |
1540 |
1541 |
1542 |
1543 |
1544 |
1545 |
1546 | 179
1547 |
1548 |
1549 |
1550 |
1551 |
1552 |
1553 |
1554 | 180
1555 |
1556 |
1557 |
1558 |
1559 | 181
1560 |
1561 |
1562 |
1563 |
1564 | 182
1565 |
1566 |
1567 |
1568 |
1569 | 183
1570 |
1571 |
1572 |
1573 |
1574 | 184
1575 |
1576 |
1577 |
1578 |
1579 | 185
1580 |
1581 |
1582 |
1583 |
1584 | 186
1585 |
1586 |
1587 |
1588 |
1589 | 187
1590 |
1591 |
1592 |
1593 |
1594 | 188
1595 |
1596 |
1597 |
1598 |
1599 |
1600 |
1601 |
1602 |
1603 |
1604 | 189
1605 |
1606 |
1607 |
1608 |
1609 |
1610 |
1611 |
1612 | 190
1613 |
1614 |
1615 |
1616 |
1617 |
1618 |
1619 |
1620 |
1621 |
1622 | 191
1623 |
1624 |
1625 |
1626 |
1627 |
1628 |
1629 |
1630 | 192
1631 |
1632 |
1633 |
1634 |
1635 | 193
1636 |
1637 |
1638 |
1639 |
1640 | 194
1641 |
1642 |
1643 |
1644 |
1645 | 195
1646 |
1647 |
1648 |
1649 |
1650 | 196
1651 |
1652 |
1653 |
1654 |
1655 | 197
1656 |
1657 |
1658 |
1659 |
1660 | 198
1661 |
1662 |
1663 |
1664 |
1665 | 199
1666 |
1667 |
1668 |
1669 |
1670 | 127
1671 |
1672 |
1673 |
1674 |
1675 |
1676 |
1677 |
1678 |
1679 |
1680 | 130
1681 |
1682 |
1683 |
1684 |
1685 | 129
1686 |
1687 |
1688 |
1689 |
1690 | 128
1691 |
1692 |
1693 |
1694 |
1695 | 230
1696 |
1697 |
1698 |
1699 |
1700 |
1701 |
1702 |
1703 | 231
1704 |
1705 |
1706 |
1707 |
1708 |
1709 |
1710 | com.apple.InterfaceBuilder.CocoaPlugin
1711 | com.apple.InterfaceBuilder.CocoaPlugin
1712 | com.apple.InterfaceBuilder.CocoaPlugin
1713 | com.apple.InterfaceBuilder.CocoaPlugin
1714 | com.apple.InterfaceBuilder.CocoaPlugin
1715 | com.apple.InterfaceBuilder.CocoaPlugin
1716 | com.apple.InterfaceBuilder.CocoaPlugin
1717 | com.apple.InterfaceBuilder.CocoaPlugin
1718 | com.apple.InterfaceBuilder.CocoaPlugin
1719 | com.apple.InterfaceBuilder.CocoaPlugin
1720 | {{132, 373}, {668, 368}}
1721 | com.apple.InterfaceBuilder.CocoaPlugin
1722 | {{132, 373}, {668, 368}}
1723 |
1724 | com.apple.InterfaceBuilder.CocoaPlugin
1725 | com.apple.InterfaceBuilder.CocoaPlugin
1726 | com.apple.InterfaceBuilder.CocoaPlugin
1727 | com.apple.InterfaceBuilder.CocoaPlugin
1728 | com.apple.InterfaceBuilder.CocoaPlugin
1729 | com.apple.InterfaceBuilder.CocoaPlugin
1730 | com.apple.InterfaceBuilder.CocoaPlugin
1731 | com.apple.InterfaceBuilder.CocoaPlugin
1732 | com.apple.InterfaceBuilder.CocoaPlugin
1733 | com.apple.InterfaceBuilder.CocoaPlugin
1734 | com.apple.InterfaceBuilder.CocoaPlugin
1735 | com.apple.InterfaceBuilder.CocoaPlugin
1736 | com.apple.InterfaceBuilder.CocoaPlugin
1737 | com.apple.InterfaceBuilder.CocoaPlugin
1738 | com.apple.InterfaceBuilder.CocoaPlugin
1739 | com.apple.InterfaceBuilder.CocoaPlugin
1740 | com.apple.InterfaceBuilder.CocoaPlugin
1741 | com.apple.InterfaceBuilder.CocoaPlugin
1742 | com.apple.InterfaceBuilder.CocoaPlugin
1743 | com.apple.InterfaceBuilder.CocoaPlugin
1744 | com.apple.InterfaceBuilder.CocoaPlugin
1745 | com.apple.InterfaceBuilder.CocoaPlugin
1746 | com.apple.InterfaceBuilder.CocoaPlugin
1747 | com.apple.InterfaceBuilder.CocoaPlugin
1748 | com.apple.InterfaceBuilder.CocoaPlugin
1749 | com.apple.InterfaceBuilder.CocoaPlugin
1750 | com.apple.InterfaceBuilder.CocoaPlugin
1751 | com.apple.InterfaceBuilder.CocoaPlugin
1752 | com.apple.InterfaceBuilder.CocoaPlugin
1753 | com.apple.InterfaceBuilder.CocoaPlugin
1754 | com.apple.InterfaceBuilder.CocoaPlugin
1755 | com.apple.InterfaceBuilder.CocoaPlugin
1756 | com.apple.InterfaceBuilder.CocoaPlugin
1757 | com.apple.InterfaceBuilder.CocoaPlugin
1758 | com.apple.InterfaceBuilder.CocoaPlugin
1759 | com.apple.InterfaceBuilder.CocoaPlugin
1760 | com.apple.InterfaceBuilder.CocoaPlugin
1761 | com.apple.InterfaceBuilder.CocoaPlugin
1762 | com.apple.InterfaceBuilder.CocoaPlugin
1763 | com.apple.InterfaceBuilder.CocoaPlugin
1764 |
1765 |
1766 |
1767 |
1768 |
1769 |
1770 | 240
1771 |
1772 |
1773 |
1774 |
1775 | NSPreferencePane
1776 | NSObject
1777 |
1778 | NSView
1779 | NSView
1780 | NSView
1781 | NSWindow
1782 |
1783 |
1784 |
1785 | _firstKeyView
1786 | NSView
1787 |
1788 |
1789 | _initialKeyView
1790 | NSView
1791 |
1792 |
1793 | _lastKeyView
1794 | NSView
1795 |
1796 |
1797 | _window
1798 | NSWindow
1799 |
1800 |
1801 |
1802 | IBProjectSource
1803 | ./Classes/NSPreferencePane.h
1804 |
1805 |
1806 |
1807 | OnAppBehaviour
1808 | NSPreferencePane
1809 |
1810 | NSTableView
1811 | NSTextField
1812 | NSTextField
1813 | NSTextField
1814 | NSTextField
1815 | NSTextField
1816 | NSTextField
1817 | NSTextField
1818 | NSTextView
1819 | NSTextView
1820 | NSTextView
1821 | NSTextView
1822 | NSTextView
1823 | NSTextView
1824 |
1825 |
1826 |
1827 | appTable
1828 | NSTableView
1829 |
1830 |
1831 | textFieldDidActivate
1832 | NSTextField
1833 |
1834 |
1835 | textFieldDidDeactivate
1836 | NSTextField
1837 |
1838 |
1839 | textFieldDidHide
1840 | NSTextField
1841 |
1842 |
1843 | textFieldDidLaunch
1844 | NSTextField
1845 |
1846 |
1847 | textFieldDidTerminate
1848 | NSTextField
1849 |
1850 |
1851 | textFieldDidUnhide
1852 | NSTextField
1853 |
1854 |
1855 | textFieldInfo
1856 | NSTextField
1857 |
1858 |
1859 | textViewDidActivate
1860 | NSTextView
1861 |
1862 |
1863 | textViewDidDeactivate
1864 | NSTextView
1865 |
1866 |
1867 | textViewDidHide
1868 | NSTextView
1869 |
1870 |
1871 | textViewDidLaunch
1872 | NSTextView
1873 |
1874 |
1875 | textViewDidTerminate
1876 | NSTextView
1877 |
1878 |
1879 | textViewDidUnhide
1880 | NSTextView
1881 |
1882 |
1883 |
1884 | IBProjectSource
1885 | ./Classes/OnAppBehaviour.h
1886 |
1887 |
1888 |
1889 |
1890 | 0
1891 | IBCocoaFramework
1892 |
1893 | com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3
1894 |
1895 |
1896 | YES
1897 | 3
1898 |
1899 |
1900 |
--------------------------------------------------------------------------------