diff --git a/AutolaunchPrefpaneModule-Info.plist b/AutolaunchPrefpaneModule-Info.plist
new file mode 100644
index 0000000..0006804
--- /dev/null
+++ b/AutolaunchPrefpaneModule-Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIdentifier
+ org.metaprl.ForgetMeNot.AutolaunchPrefpaneModule
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ BNDL
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ NSPrincipalClass
+ FMNLoginItems
+
+
diff --git a/FMN.xcodeproj/project.pbxproj b/FMN.xcodeproj/project.pbxproj
index bb034fb..8e34650 100644
--- a/FMN.xcodeproj/project.pbxproj
+++ b/FMN.xcodeproj/project.pbxproj
@@ -27,14 +27,12 @@
/* Begin PBXBuildFile section */
0E13E4580A9A7E950093153D /* FMNPrefPane.nib in Resources */ = {isa = PBXBuildFile; fileRef = 0E13E44F0A9A7E950093153D /* FMNPrefPane.nib */; };
0E13E4590A9A7E950093153D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0E13E4510A9A7E950093153D /* InfoPlist.strings */; };
- 0E13E45A0A9A7E950093153D /* FMNPrefPane.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E13E4540A9A7E950093153D /* FMNPrefPane.m */; };
0E13E45D0A9A7E950093153D /* version.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0E13E4570A9A7E950093153D /* version.plist */; };
0E13E4600A9A7ED00093153D /* Forget-Me-Not.app in Resources */ = {isa = PBXBuildFile; fileRef = 8D1107320486CEB800E47090 /* Forget-Me-Not.app */; };
0E13E5230A9A8C3A0093153D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
0E13E5380A9A8C880093153D /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E13E5370A9A8C880093153D /* PreferencePanes.framework */; };
0E2A9C770A9F71A40005F7D6 /* diagram-disabled.png in Resources */ = {isa = PBXBuildFile; fileRef = 0E2A9C750A9F71A40005F7D6 /* diagram-disabled.png */; };
0E2A9C780A9F71A40005F7D6 /* diagram-enabled.png in Resources */ = {isa = PBXBuildFile; fileRef = 0E2A9C760A9F71A40005F7D6 /* diagram-enabled.png */; };
- 0E3EE9700AAF9C240022D5E3 /* FMNLoginItems.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E3EE96F0AAF9C240022D5E3 /* FMNLoginItems.m */; };
0E4DE3F30A9BBA37001C9EEF /* X11Bridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EC122FD0A71730700CE04DC /* X11Bridge.m */; };
0E4DE3F40A9BBA38001C9EEF /* X11Restorable.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E13E0910A93E8670093153D /* X11Restorable.m */; };
0E4DE3F50A9BBA39001C9EEF /* X11WindowOrientation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EC122F80A71728B00CE04DC /* X11WindowOrientation.m */; };
@@ -52,6 +50,10 @@
66299A150A6E14A4005757CB /* CGDisplayConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 66299A140A6E14A4005757CB /* CGDisplayConfiguration.m */; };
66299AC70A6E24DE005757CB /* FMNWindowOrientation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66299AC60A6E24DE005757CB /* FMNWindowOrientation.m */; };
66496ADB0ABBA5A90052AA87 /* FMNModuleLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E4DE4290A9BBD9D001C9EEF /* FMNModuleLoader.m */; };
+ 66D404980ABCE64C0014F0F4 /* FMNLoginItems.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E3EE96F0AAF9C240022D5E3 /* FMNLoginItems.m */; };
+ 66D404DA0ABCEA430014F0F4 /* AutolaunchPrefpaneModule.plugin in Copy into Forget-Me-Not.prefpane */ = {isa = PBXBuildFile; fileRef = 66D404810ABCE52B0014F0F4 /* AutolaunchPrefpaneModule.plugin */; };
+ 66D405020ABCEE2D0014F0F4 /* AutolaunchPrefpaneModule.nib in Resources */ = {isa = PBXBuildFile; fileRef = 66D405010ABCEE2D0014F0F4 /* AutolaunchPrefpaneModule.nib */; };
+ 66D405580ABCF44A0014F0F4 /* FMNPrefPane.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E13E4540A9A7E950093153D /* FMNPrefPane.m */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -122,6 +124,13 @@
remoteGlobalIDString = 0E13E42B0A9A7DDD0093153D;
remoteInfo = "Forget-Me-Not Prefpane";
};
+ 66D404860ABCE53C0014F0F4 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 0E13E42B0A9A7DDD0093153D /* Forget-Me-Not Prefpane */;
+ remoteInfo = "Forget-Me-Not Prefpane";
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -147,6 +156,17 @@
name = "Copy into Forget-Me-Not.app";
runOnlyForDeploymentPostprocessing = 0;
};
+ 66D4048A0ABCE59F0014F0F4 /* Copy into Forget-Me-Not.prefpane */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "Forget-Me-Not.prefpane/Contents/PlugIns";
+ dstSubfolderSpec = 16;
+ files = (
+ 66D404DA0ABCEA430014F0F4 /* AutolaunchPrefpaneModule.plugin in Copy into Forget-Me-Not.prefpane */,
+ );
+ name = "Copy into Forget-Me-Not.prefpane";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
@@ -168,8 +188,8 @@
0E13E5370A9A8C880093153D /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = /System/Library/Frameworks/PreferencePanes.framework; sourceTree = ""; };
0E2A9C750A9F71A40005F7D6 /* diagram-disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "diagram-disabled.png"; path = "../diagram-disabled.png"; sourceTree = ""; };
0E2A9C760A9F71A40005F7D6 /* diagram-enabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "diagram-enabled.png"; path = "../diagram-enabled.png"; sourceTree = ""; };
- 0E3EE96E0AAF9C240022D5E3 /* FMNLoginItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FMNLoginItems.h; sourceTree = ""; };
- 0E3EE96F0AAF9C240022D5E3 /* FMNLoginItems.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FMNLoginItems.m; sourceTree = ""; };
+ 0E3EE96E0AAF9C240022D5E3 /* FMNLoginItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FMNLoginItems.h; path = PreferencePane/FMNLoginItems.h; sourceTree = ""; };
+ 0E3EE96F0AAF9C240022D5E3 /* FMNLoginItems.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FMNLoginItems.m; path = PreferencePane/FMNLoginItems.m; sourceTree = ""; };
0E4DE3CB0A9BB92C001C9EEF /* X11Module.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = X11Module.plugin; sourceTree = BUILT_PRODUCTS_DIR; };
0E4DE3CC0A9BB92C001C9EEF /* X11Module-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "X11Module-Info.plist"; sourceTree = ""; };
0E4DE4280A9BBD9D001C9EEF /* FMNModuleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FMNModuleLoader.h; sourceTree = ""; };
@@ -211,6 +231,9 @@
66299ADB0A6E2768005757CB /* AXApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AXApplication.m; sourceTree = ""; };
6668136E0ABB4B4D0066EABF /* FMNPrefpaneModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FMNPrefpaneModule.h; sourceTree = ""; };
666FF6440A6B17F6007110EF /* FMNDisplayConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FMNDisplayConfiguration.h; sourceTree = ""; };
+ 66D404810ABCE52B0014F0F4 /* AutolaunchPrefpaneModule.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AutolaunchPrefpaneModule.plugin; sourceTree = BUILT_PRODUCTS_DIR; };
+ 66D404820ABCE52B0014F0F4 /* AutolaunchPrefpaneModule-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "AutolaunchPrefpaneModule-Info.plist"; sourceTree = ""; };
+ 66D405010ABCEE2D0014F0F4 /* AutolaunchPrefpaneModule.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = AutolaunchPrefpaneModule.nib; path = PreferencePane/AutolaunchPrefpaneModule.nib; sourceTree = ""; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
8D1107320486CEB800E47090 /* Forget-Me-Not.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Forget-Me-Not.app"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
@@ -239,6 +262,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 66D4047F0ABCE52B0014F0F4 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -253,6 +283,7 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
+ 66D404970ABCE62E0014F0F4 /* Autolaunch Prefpane Module */,
0E13E37D0A9A545D0093153D /* AX Module */,
0E13E37C0A9A54450093153D /* X11 Module */,
6629992D0A6E0386005757CB /* CGDisplay.h */,
@@ -299,8 +330,6 @@
isa = PBXGroup;
children = (
0E2A9C7B0A9F72060005F7D6 /* Resources */,
- 0E3EE96E0AAF9C240022D5E3 /* FMNLoginItems.h */,
- 0E3EE96F0AAF9C240022D5E3 /* FMNLoginItems.m */,
0E13E4530A9A7E950093153D /* FMNPrefPane.h */,
0E13E4540A9A7E950093153D /* FMNPrefPane.m */,
);
@@ -347,6 +376,7 @@
0E13E42C0A9A7DDD0093153D /* Forget-Me-Not.prefpane */,
0E4DE3CB0A9BB92C001C9EEF /* X11Module.plugin */,
0E4DE4A50A9BCADA001C9EEF /* AXModule.plugin */,
+ 66D404810ABCE52B0014F0F4 /* AutolaunchPrefpaneModule.plugin */,
);
name = Products;
sourceTree = "";
@@ -424,6 +454,17 @@
name = "Module Loader";
sourceTree = "";
};
+ 66D404970ABCE62E0014F0F4 /* Autolaunch Prefpane Module */ = {
+ isa = PBXGroup;
+ children = (
+ 66D404820ABCE52B0014F0F4 /* AutolaunchPrefpaneModule-Info.plist */,
+ 66D405010ABCEE2D0014F0F4 /* AutolaunchPrefpaneModule.nib */,
+ 0E3EE96E0AAF9C240022D5E3 /* FMNLoginItems.h */,
+ 0E3EE96F0AAF9C240022D5E3 /* FMNLoginItems.m */,
+ );
+ name = "Autolaunch Prefpane Module";
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -486,6 +527,25 @@
productReference = 0E4DE4A50A9BCADA001C9EEF /* AXModule.plugin */;
productType = "com.apple.product-type.bundle";
};
+ 66D404800ABCE52B0014F0F4 /* AutolaunchPrefpaneModule */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 66D404830ABCE52B0014F0F4 /* Build configuration list for PBXNativeTarget "AutolaunchPrefpaneModule" */;
+ buildPhases = (
+ 66D4047D0ABCE52B0014F0F4 /* Resources */,
+ 66D4047E0ABCE52B0014F0F4 /* Sources */,
+ 66D4047F0ABCE52B0014F0F4 /* Frameworks */,
+ 66D4048A0ABCE59F0014F0F4 /* Copy into Forget-Me-Not.prefpane */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 66D404870ABCE53C0014F0F4 /* PBXTargetDependency */,
+ );
+ name = AutolaunchPrefpaneModule;
+ productName = AutolaunchPrefpaneModule;
+ productReference = 66D404810ABCE52B0014F0F4 /* AutolaunchPrefpaneModule.plugin */;
+ productType = "com.apple.product-type.bundle";
+ };
8D1107260486CEB800E47090 /* Forget-Me-Not App */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Forget-Me-Not App" */;
@@ -518,6 +578,7 @@
0E4DE4A40A9BCADA001C9EEF /* AXModule */,
0E4DE3CA0A9BB92C001C9EEF /* X11Module */,
0E13E42B0A9A7DDD0093153D /* Forget-Me-Not Prefpane */,
+ 66D404800ABCE52B0014F0F4 /* AutolaunchPrefpaneModule */,
0EF04FA40AAEA3B70028356D /* Package FMN */,
);
};
@@ -553,6 +614,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 66D4047D0ABCE52B0014F0F4 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 66D405020ABCEE2D0014F0F4 /* AutolaunchPrefpaneModule.nib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -600,9 +669,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 0E13E45A0A9A7E950093153D /* FMNPrefPane.m in Sources */,
- 0E3EE9700AAF9C240022D5E3 /* FMNLoginItems.m in Sources */,
66496ADB0ABBA5A90052AA87 /* FMNModuleLoader.m in Sources */,
+ 66D405580ABCF44A0014F0F4 /* FMNPrefPane.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -626,6 +694,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 66D4047E0ABCE52B0014F0F4 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 66D404980ABCE64C0014F0F4 /* FMNLoginItems.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -687,6 +763,11 @@
target = 0E13E42B0A9A7DDD0093153D /* Forget-Me-Not Prefpane */;
targetProxy = 0EF04FAB0AAEA3D40028356D /* PBXContainerItemProxy */;
};
+ 66D404870ABCE53C0014F0F4 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 0E13E42B0A9A7DDD0093153D /* Forget-Me-Not Prefpane */;
+ targetProxy = 66D404860ABCE53C0014F0F4 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
@@ -921,6 +1002,56 @@
};
name = Release;
};
+ 66D404840ABCE52B0014F0F4 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INFOPLIST_FILE = "AutolaunchPrefpaneModule-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Bundles";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = AutolaunchPrefpaneModule;
+ WRAPPER_EXTENSION = plugin;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 66D404850ABCE52B0014F0F4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ INFOPLIST_FILE = "AutolaunchPrefpaneModule-Info.plist";
+ INSTALL_PATH = "$(HOME)/Library/Bundles";
+ OTHER_LDFLAGS = (
+ "-framework",
+ Foundation,
+ "-framework",
+ AppKit,
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = AutolaunchPrefpaneModule;
+ WRAPPER_EXTENSION = plugin;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1035,6 +1166,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 66D404830ABCE52B0014F0F4 /* Build configuration list for PBXNativeTarget "AutolaunchPrefpaneModule" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 66D404840ABCE52B0014F0F4 /* Debug */,
+ 66D404850ABCE52B0014F0F4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Forget-Me-Not App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/FMNPrefpaneModule.h b/FMNPrefpaneModule.h
index 3d0ef66..32acba0 100644
--- a/FMNPrefpaneModule.h
+++ b/FMNPrefpaneModule.h
@@ -11,6 +11,10 @@
@protocol FMNPrefpaneModule
+- (void) notifyWillSelect;
+- (void) notifyDidSelect;
+- (void) notifyUnselected;
+
- (NSView*) getControlView;
- (BOOL) isTabControl;
diff --git a/PreferencePane/AutolaunchPrefpaneModule.nib/classes.nib b/PreferencePane/AutolaunchPrefpaneModule.nib/classes.nib
new file mode 100644
index 0000000..4fff58b
--- /dev/null
+++ b/PreferencePane/AutolaunchPrefpaneModule.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+ IBClasses = (
+ {
+ CLASS = FMNLoginItems;
+ LANGUAGE = ObjC;
+ OUTLETS = {mAutolaunch = NSButton; };
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
+ );
+ IBVersion = 1;
+}
\ No newline at end of file
diff --git a/PreferencePane/AutolaunchPrefpaneModule.nib/info.nib b/PreferencePane/AutolaunchPrefpaneModule.nib/info.nib
new file mode 100644
index 0000000..3879ca3
--- /dev/null
+++ b/PreferencePane/AutolaunchPrefpaneModule.nib/info.nib
@@ -0,0 +1,21 @@
+
+
+
+
+ IBDocumentLocation
+ 434 416 356 240 0 0 1680 1028
+ IBEditorPositions
+
+ 5
+ 711 658 257 56 0 0 1680 1028
+
+ IBFramework Version
+ 446.1
+ IBOpenObjects
+
+ 5
+
+ IBSystem Version
+ 8J135
+
+
diff --git a/PreferencePane/AutolaunchPrefpaneModule.nib/keyedobjects.nib b/PreferencePane/AutolaunchPrefpaneModule.nib/keyedobjects.nib
new file mode 100644
index 0000000..41e576c
Binary files /dev/null and b/PreferencePane/AutolaunchPrefpaneModule.nib/keyedobjects.nib differ
diff --git a/PreferencePane/English.lproj/FMNPrefPane.nib/keyedobjects.nib b/PreferencePane/English.lproj/FMNPrefPane.nib/keyedobjects.nib
index 143342d..1cacdec 100644
Binary files a/PreferencePane/English.lproj/FMNPrefPane.nib/keyedobjects.nib and b/PreferencePane/English.lproj/FMNPrefPane.nib/keyedobjects.nib differ
diff --git a/PreferencePane/FMNLoginItems.h b/PreferencePane/FMNLoginItems.h
index e3c55b0..9b693c9 100644
--- a/PreferencePane/FMNLoginItems.h
+++ b/PreferencePane/FMNLoginItems.h
@@ -7,8 +7,11 @@
//
#import
+#import "FMNPrefpaneModule.h"
-@interface FMNLoginItems : NSObject {
+@interface FMNLoginItems : NSObject {
+ NSString* mFMNPath;
+ IBOutlet NSButton* mAutolaunch;
}
// appName is the name of the app *without* any .app extension.
diff --git a/PreferencePane/FMNLoginItems.m b/PreferencePane/FMNLoginItems.m
index 8b06ae4..cfbb65d 100644
--- a/PreferencePane/FMNLoginItems.m
+++ b/PreferencePane/FMNLoginItems.m
@@ -7,6 +7,7 @@
//
#import "FMNLoginItems.h"
+#import "FMNPrefPane.h"
@implementation FMNLoginItems
@@ -68,4 +69,68 @@ + (BOOL) addLoginItem:(NSString *)appPath hidden:(BOOL)hidden
return NO;
}
+- (void) notifyWillSelect
+{
+
+}
+
+- (void) notifyDidSelect
+{
+ if (AXAPIEnabled()) {
+ [mAutolaunch setState:[FMNLoginItems isLoginItem:@"Forget-Me-Not"]];
+ }
+}
+
+- (void) notifyUnselected
+{
+ if ([mAutolaunch state] == NSOnState) {
+ if (![FMNLoginItems isLoginItem:@"Forget-Me-Not"]) {
+ [FMNLoginItems addLoginItem:mFMNPath hidden:NO ];
+ }
+ } else {
+ if ([FMNLoginItems isLoginItem:@"Forget-Me-Not"]) {
+ [FMNLoginItems deleteLoginItem:@"Forget-Me-Not"];
+ }
+ }
+}
+
+- (id) initWithBundle: (NSBundle*) bundle
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ NSString* myBundlePath = [bundle bundlePath];
+ NSString* parentBundlePath = [NSString stringWithFormat:@"%@/../../../",myBundlePath];
+ mFMNPath = [[NSBundle pathForResource:@"Forget-Me-Not" ofType:@"app" inDirectory: parentBundlePath] retain];
+
+ // Load our nib
+ [NSBundle loadNibNamed:@"AutolaunchPrefpaneModule" owner:self];
+
+ return self;
+}
+
+- (NSView*) getControlView
+{
+ return [mAutolaunch retain];
+
+ /*NSButton* newButton;
+ NSSize size;
+
+ newButton = [[NSButton alloc] init];
+ [newButton setButtonType:NSSwitchButton];
+ //[newButton setTitle: @"Autoload Prefpane Module"];
+ [newButton setTitle: mFMNPath];
+ size.width = 240;
+ size.height = 20;
+ [newButton setFrameSize: size];
+
+ return newButton;*/
+}
+
+- (BOOL) isTabControl
+{
+ return NO;
+}
+
@end
diff --git a/PreferencePane/FMNPrefPane.h b/PreferencePane/FMNPrefPane.h
index e97ad57..e63f5ec 100644
--- a/PreferencePane/FMNPrefPane.h
+++ b/PreferencePane/FMNPrefPane.h
@@ -24,7 +24,6 @@
IBOutlet NSTextField *mStatusField;
IBOutlet NSBox *mControls;
IBOutlet NSButton *mActivated;
- IBOutlet NSButton *mAutolaunch;
IBOutlet NSImageView *mDiagram;
IBOutlet id mAccessWarning;
IBOutlet id mVersionLabel;
diff --git a/PreferencePane/FMNPrefPane.m b/PreferencePane/FMNPrefPane.m
index efcc570..2b38917 100644
--- a/PreferencePane/FMNPrefPane.m
+++ b/PreferencePane/FMNPrefPane.m
@@ -8,7 +8,6 @@
#import "FMNPrefPane.h"
#import "FMNServer.h"
-#import "FMNLoginItems.h"
#import "FMNModuleLoader.h"
#import "FMNPrefpaneModule.h"
#import "version.h"
@@ -186,6 +185,17 @@ - (void) mainViewDidLoad
}
}
+- (void) willSelect
+{
+ NSEnumerator *enumerator = [fmnPrefpaneModules objectEnumerator];
+ FMNPrefpaneModuleRef module;
+
+ while (module = (FMNPrefpaneModuleRef)[enumerator nextObject])
+ {
+ [module notifyWillSelect];
+ }
+}
+
// This is called when our pane has been selected
- (void) didSelect
{
@@ -198,26 +208,32 @@ - (void) didSelect
[self connectToFMN];
[self updateFMNStatus];
[self displayWindow]; // The next step can be slow, so display now
- [mAutolaunch setState:[FMNLoginItems isLoginItem:@"Forget-Me-Not"]];
} else {
[mDiagram setImage:nil];
[mAccessWarning setHidden:NO];
[mLaunchQuit setEnabled:NO];
}
+
+ NSEnumerator *enumerator = [fmnPrefpaneModules objectEnumerator];
+ FMNPrefpaneModuleRef module;
+
+ while (module = (FMNPrefpaneModuleRef)[enumerator nextObject])
+ {
+ [module notifyDidSelect];
+ }
}
// This is called when it's unselected
- (NSPreferencePaneUnselectReply)shouldUnselect
{
- if ([mAutolaunch state] == NSOnState) {
- if (![FMNLoginItems isLoginItem:@"Forget-Me-Not"]) {
- [FMNLoginItems addLoginItem:mFMNPath hidden:NO ];
- }
- } else {
- if ([FMNLoginItems isLoginItem:@"Forget-Me-Not"]) {
- [FMNLoginItems deleteLoginItem:@"Forget-Me-Not"];
- }
+ NSEnumerator *enumerator = [fmnPrefpaneModules objectEnumerator];
+ FMNPrefpaneModuleRef module;
+
+ while (module = (FMNPrefpaneModuleRef)[enumerator nextObject])
+ {
+ [module notifyUnselected];
}
+
[mControls setHidden:YES];
if (mFMNProxy != nil) {
[mFMNProxy release];