Skip to content

Commit

Permalink
Plugin
Browse files Browse the repository at this point in the history
git-svn-id: https://nally.googlecode.com/svn/trunk@150 db928f3c-c32d-11dd-ba5c-d3b7c2b3b534
  • Loading branch information
jjgod committed Dec 5, 2008
1 parent 8abff57 commit 1091072
Show file tree
Hide file tree
Showing 18 changed files with 418 additions and 10 deletions.
4 changes: 0 additions & 4 deletions MacBlueTelnet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
07B3707A0D6840B20035E87D /* HMBlkAppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07B370790D6840B20035E87D /* HMBlkAppKit.framework */; };
07B3708E0D6840BB0035E87D /* HMBlkAppKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 07B370790D6840B20035E87D /* HMBlkAppKit.framework */; };
07B73D900E5816FF00CC97D3 /* YLPluginLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 07B73D8F0E5816FF00CC97D3 /* YLPluginLoader.m */; };
07B73D9F0E581E2C00CC97D3 /* YLBundle.m in Sources */ = {isa = PBXBuildFile; fileRef = 07B73D9E0E581E2C00CC97D3 /* YLBundle.m */; };
850711AB0CA7A347005F4734 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 850711AA0CA7A347005F4734 /* ApplicationServices.framework */; };
85137B330D02192800833909 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 85137B320D02192800833909 /* Credits.rtf */; };
85145AA10AB40053009FC710 /* YLTelnet.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85145AA00AB40053009FC710 /* YLTelnet.mm */; };
Expand Down Expand Up @@ -76,7 +75,6 @@
07B73D8E0E5816FF00CC97D3 /* YLPluginLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YLPluginLoader.h; sourceTree = "<group>"; };
07B73D8F0E5816FF00CC97D3 /* YLPluginLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YLPluginLoader.m; sourceTree = "<group>"; };
07B73D9D0E581E2C00CC97D3 /* YLBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YLBundle.h; sourceTree = "<group>"; };
07B73D9E0E581E2C00CC97D3 /* YLBundle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YLBundle.m; sourceTree = "<group>"; };
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -179,7 +177,6 @@
07B73D8E0E5816FF00CC97D3 /* YLPluginLoader.h */,
07B73D8F0E5816FF00CC97D3 /* YLPluginLoader.m */,
07B73D9D0E581E2C00CC97D3 /* YLBundle.h */,
07B73D9E0E581E2C00CC97D3 /* YLBundle.m */,
);
name = Classes;
sourceTree = "<group>";
Expand Down Expand Up @@ -410,7 +407,6 @@
07B370690D6840600035E87D /* YLImagePreviewer.m in Sources */,
070D50430D9BF40400EC2660 /* YLImageView.m in Sources */,
07B73D900E5816FF00CC97D3 /* YLPluginLoader.m in Sources */,
07B73D9F0E581E2C00CC97D3 /* YLBundle.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
4 changes: 2 additions & 2 deletions Plugins/HelloNally/HelloNally.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ - (id) init
title = [[NSBundle bundleForClass: [self class]] localizedStringForKey: @"BundleTitle"
value: @""
table: nil];
NSLog(@"Loading Bundle HelloNally.");
NSLog(@"Loading Bundle HelloNally.");
[self addMenuItemWithTitle: @"Hey"
action: nil
keyEquivalent: @""];
keyEquivalent: @""];
}

return self;
Expand Down
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions Plugins/ImagePreviewer/ImagePreviewer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// ImagePreviewer.h
// ImagePreviewer
//
// Created by Jjgod Jiang on 8/18/08.
// Copyright 2008 Jjgod Jiang. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "YLBundle.h"

@interface ImagePreviewer : YLBundle {
BOOL enabled;
}

- (IBAction) flipEnabled: (id) sender;

@end
43 changes: 43 additions & 0 deletions Plugins/ImagePreviewer/ImagePreviewer.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// ImagePreviewer.m
// ImagePreviewer
//
// Created by Jjgod Jiang on 8/18/08.
// Copyright 2008 Jjgod Jiang. All rights reserved.
//

#import "ImagePreviewer.h"

@implementation ImagePreviewer

- (id) init
{
if (self = [super init])
{
// note: we can't use - NSLocalizedString(@"BundleDescription", "");
// because the main bundle is always the app, so we need to target our
// own bundle this way ... and since these are localized to this bundle/class
description = [self localizedStringForKey: @"BundleDescription"];
title = [self localizedStringForKey: @"BundleTitle"];
enabled = YES;

NSLog(@"Loading Bundle ImagePreviewer.");

NSMenuItem *item = [[NSMenuItem alloc] initWithTitle: [self localizedStringForKey: @"EnableImagePreview"]
action: @selector(flipEnabled:)
keyEquivalent: @""];
[item setState: NSOnState];
[self addMenuItem: item];
[item release];
}

return self;
}

- (IBAction) flipEnabled: (id) sender
{
enabled = !enabled;
[(NSMenuItem *) sender setState: enabled ? NSOnState : NSOffState];
}

@end
Binary file not shown.
286 changes: 286 additions & 0 deletions Plugins/ImagePreviewer/ImagePreviewer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {

/* Begin PBXBuildFile section */
077CD77F0E5956E300A7A9B3 /* ImagePreviewer.m in Sources */ = {isa = PBXBuildFile; fileRef = 077CD77E0E5956E300A7A9B3 /* ImagePreviewer.m */; };
077CD7830E59570200A7A9B3 /* YLBundle.m in Sources */ = {isa = PBXBuildFile; fileRef = 077CD7820E59570200A7A9B3 /* YLBundle.m */; };
077CD7870E59575E00A7A9B3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 077CD7860E59575E00A7A9B3 /* Localizable.strings */; };
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
077CD77D0E5956E300A7A9B3 /* ImagePreviewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImagePreviewer.h; sourceTree = "<group>"; };
077CD77E0E5956E300A7A9B3 /* ImagePreviewer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImagePreviewer.m; sourceTree = "<group>"; };
077CD7810E59570200A7A9B3 /* YLBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YLBundle.h; path = ../../YLBundle.h; sourceTree = SOURCE_ROOT; };
077CD7820E59570200A7A9B3 /* YLBundle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YLBundle.m; path = ../../YLBundle.m; sourceTree = SOURCE_ROOT; };
077CD7840E59573100A7A9B3 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCF630370AF2F00C91783 /* ImagePreviewer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImagePreviewer_Prefix.pch; sourceTree = "<group>"; };
8D5B49B6048680CD000E48DA /* ImagePreviewer.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ImagePreviewer.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
8D5B49B3048680CD000E48DA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
089C166AFE841209C02AAC07 /* ImagePreviewer */ = {
isa = PBXGroup;
children = (
08FB77AFFE84173DC02AAC07 /* Classes */,
32C88E010371C26100C91783 /* Other Sources */,
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* Frameworks and Libraries */,
19C28FB8FE9D52D311CA2CBB /* Products */,
);
name = ImagePreviewer;
sourceTree = "<group>";
};
089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */,
);
name = "Frameworks and Libraries";
sourceTree = "<group>";
};
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
8D5B49B7048680CD000E48DA /* Info.plist */,
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
077CD7860E59575E00A7A9B3 /* Localizable.strings */,
);
name = Resources;
sourceTree = "<group>";
};
08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
077CD7810E59570200A7A9B3 /* YLBundle.h */,
077CD7820E59570200A7A9B3 /* YLBundle.m */,
077CD77D0E5956E300A7A9B3 /* ImagePreviewer.h */,
077CD77E0E5956E300A7A9B3 /* ImagePreviewer.m */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
089C167FFE841241C02AAC07 /* AppKit.framework */,
D2F7E65807B2D6F200F64583 /* CoreData.framework */,
089C1672FE841209C02AAC07 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FB8FE9D52D311CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D5B49B6048680CD000E48DA /* ImagePreviewer.bundle */,
);
name = Products;
sourceTree = "<group>";
};
32C88E010371C26100C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
32DBCF630370AF2F00C91783 /* ImagePreviewer_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
8D5B49AC048680CD000E48DA /* ImagePreviewer */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "ImagePreviewer" */;
buildPhases = (
8D5B49AF048680CD000E48DA /* Resources */,
8D5B49B1048680CD000E48DA /* Sources */,
8D5B49B3048680CD000E48DA /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = ImagePreviewer;
productInstallPath = "$(HOME)/Library/Bundles";
productName = ImagePreviewer;
productReference = 8D5B49B6048680CD000E48DA /* ImagePreviewer.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "ImagePreviewer" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 089C166AFE841209C02AAC07 /* ImagePreviewer */;
projectDirPath = "";
projectRoot = "";
targets = (
8D5B49AC048680CD000E48DA /* ImagePreviewer */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
8D5B49AF048680CD000E48DA /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */,
077CD7870E59575E00A7A9B3 /* Localizable.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8D5B49B1048680CD000E48DA /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
077CD77F0E5956E300A7A9B3 /* ImagePreviewer.m in Sources */,
077CD7830E59570200A7A9B3 /* YLBundle.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
077CD7860E59575E00A7A9B3 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
077CD7840E59573100A7A9B3 /* English */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C167EFE841241C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
1DEB913B08733D840010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ImagePreviewer_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_NAME = ImagePreviewer;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
1DEB913C08733D840010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ImagePreviewer_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_NAME = ImagePreviewer;
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
1DEB913F08733D840010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = Debug;
};
1DEB914008733D840010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "ImagePreviewer" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB913B08733D840010E9CD /* Debug */,
1DEB913C08733D840010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "ImagePreviewer" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB913F08733D840010E9CD /* Debug */,
1DEB914008733D840010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
}
Loading

0 comments on commit 1091072

Please sign in to comment.