mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-09 12:17:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b265310ef | ||
|
|
f4f48e4e09 | ||
|
|
4afb8003e6 | ||
|
|
5876bcf592 | ||
|
|
2486965338 | ||
|
|
ee830f51d7 | ||
|
|
343b3e41f3 | ||
|
|
2474774242 |
+46
-2
@@ -70,7 +70,9 @@ var LEFT_SHADOW_INSET = 3.0,
|
||||
|
||||
BOOL _hasShadow;
|
||||
CPView _shadowView;
|
||||
|
||||
|
||||
BOOL _isEditable;
|
||||
|
||||
CGRect _imageRect;
|
||||
}
|
||||
|
||||
@@ -339,11 +341,47 @@ var LEFT_SHADOW_INSET = 3.0,
|
||||
[[self nextResponder] mouseDown:anEvent];
|
||||
}
|
||||
|
||||
- (void)setEditable:(BOOL)shouldBeEditable
|
||||
{
|
||||
if (_isEditable === shouldBeEditable)
|
||||
return;
|
||||
|
||||
_isEditable = shouldBeEditable;
|
||||
|
||||
if (_isEditable)
|
||||
[self registerForDraggedTypes:[CPImagesPboardType]];
|
||||
|
||||
else
|
||||
{
|
||||
var draggedTypes = [self registeredDraggedTypes];
|
||||
|
||||
[self unregisterDraggedTypes];
|
||||
|
||||
[draggedTypes removeObjectIdenticalTo:CPImagesPboardType];
|
||||
|
||||
[self registerForDraggedTypes:draggedTypes];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)isEditable
|
||||
{
|
||||
return _isEditable;
|
||||
}
|
||||
|
||||
- (void)performDragOperation:(CPDraggingInfo)aSender
|
||||
{
|
||||
var images = [CPKeyedUnarchiver unarchiveObjectWithData:[[aSender draggingPasteboard] dataForType:CPImagesPboardType]];
|
||||
|
||||
if ([images count])
|
||||
[self setImage:images[0]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPImageViewImageKey = @"CPImageViewImageKey",
|
||||
CPImageViewImageScalingKey = @"CPImageViewImageScalingKey",
|
||||
CPImageViewHasShadowKey = @"CPImageViewHasShadowKey";
|
||||
CPImageViewHasShadowKey = @"CPImageViewHasShadowKey",
|
||||
CPImageViewIsEditableKey = @"CPImageViewIsEditableKey";
|
||||
|
||||
@implementation CPImageView (CPCoding)
|
||||
|
||||
@@ -372,6 +410,9 @@ var CPImageViewImageKey = @"CPImageViewImageKey",
|
||||
|
||||
[self setHasShadow:[aCoder decodeBoolForKey:CPImageViewHasShadowKey]];
|
||||
|
||||
if ([aCoder decodeBoolForKey:CPImageViewIsEditableKey] || NO)
|
||||
[self setEditable:YES];
|
||||
|
||||
[self setNeedsLayout];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
@@ -402,6 +443,9 @@ var CPImageViewImageKey = @"CPImageViewImageKey",
|
||||
_subviews = actualSubviews;
|
||||
|
||||
[aCoder encodeBool:_hasShadow forKey:CPImageViewHasShadowKey];
|
||||
|
||||
if (_isEditable)
|
||||
[aCoder encodeBool:_isEditable forKey:CPImageViewIsEditableKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -38,6 +38,10 @@ CPFontPboardType = @"CPFontPboardType";
|
||||
CPHTMLPboardType = @"CPHTMLPboardType";
|
||||
CPStringPboardType = @"CPStringPboardType";
|
||||
CPURLPboardType = @"CPURLPboardType";
|
||||
CPImagesPboardType = @"CPImagesPboardType";
|
||||
CPVideosPboardType = @"CPVideosPboardType";
|
||||
|
||||
// Deprecated
|
||||
CPImagePboardType = @"CPImagePboardType";
|
||||
|
||||
var CPPasteboards = nil;
|
||||
|
||||
+5
-1
@@ -1469,7 +1469,7 @@ setBoundsOrigin:
|
||||
*/
|
||||
- (void)registerForDraggedTypes:(CPArray)pasteboardTypes
|
||||
{
|
||||
if (!pasteboardTypes)
|
||||
if (!pasteboardTypes || ![pasteboardTypes count])
|
||||
return;
|
||||
|
||||
var theWindow = [self window];
|
||||
@@ -2234,6 +2234,10 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
_subviews = [aCoder decodeObjectForKey:CPViewSubviewsKey] || [];
|
||||
_superview = [aCoder decodeObjectForKey:CPViewSuperviewKey];
|
||||
|
||||
// FIXME: Should we encode/decode this?
|
||||
_registeredDraggedTypes = [CPSet set];
|
||||
_registeredDraggedTypesArray = [];
|
||||
|
||||
_autoresizingMask = [aCoder decodeIntForKey:CPViewAutoresizingMaskKey] || CPViewNotSizable;
|
||||
_autoresizesSubviews = ![aCoder containsValueForKey:CPViewAutoresizesSubviewsKey] || [aCoder decodeBoolForKey:CPViewAutoresizesSubviewsKey];
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ CPTexturedBackgroundWindowMask
|
||||
*/
|
||||
- (CGRect)frame
|
||||
{
|
||||
return _frame;
|
||||
return _CGRectMakeCopy(_frame);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ AppKitFiles = FileList['**/*.j'].exclude('CoreGraphics/CGContextCanvas.j', 'Core
|
||||
ObjectiveJ::BundleTask.new(:AppKit) do |t|
|
||||
t.name = 'AppKit'
|
||||
t.identifier = 'com.280n.AppKit'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'AppKit classes for Cappuccino'
|
||||
|
||||
|
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 185 B After Width: | Height: | Size: 185 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -516,12 +516,12 @@
|
||||
+ (CPSlider)themedCircularSlider
|
||||
{
|
||||
var slider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 34.0, 34.0)],
|
||||
trackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"circularSliderBezel.png" size:CGSizeMake(34.0, 34.0)]);
|
||||
trackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"slider-circular-bezel.png" size:CGSizeMake(34.0, 34.0)]);
|
||||
|
||||
[slider setSliderType:CPCircularSlider];
|
||||
[slider setValue:trackColor forThemeAttribute:@"track-color" inState:CPThemeStateCircular];
|
||||
|
||||
var knobColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"circularSliderKnob.png" size:CGSizeMake(5.0, 5.0)]],
|
||||
var knobColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"slider-circular-knob.png" size:CGSizeMake(5.0, 5.0)]],
|
||||
knobHighlightedColor = knobColor;
|
||||
|
||||
[slider setValue:CGSizeMake(5.0, 5.0) forThemeAttribute:@"knob-size" inState:CPThemeStateCircular];
|
||||
|
||||
@@ -12,7 +12,7 @@ $BUILD_PATH = File.join($BUILD_DIR, $CONFIGURATION, 'BlendKit')
|
||||
ObjectiveJ::BundleTask.new(:BlendKit) do |t|
|
||||
t.name = 'BlendKit'
|
||||
t.identifier = 'com.280n.BlendKit'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'BlendKit classes for Cappuccino'
|
||||
|
||||
@@ -15,7 +15,7 @@ $ENVIRONMENT_LIB_PRODUCT = File.join($ENVIRONMENT_LIB_DIR, 'blend')
|
||||
ObjectiveJ::BundleTask.new(:blend) do |t|
|
||||
t.name = 'blend'
|
||||
t.identifier = 'com.280n.blend'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'blend classes for Cappuccino'
|
||||
|
||||
Vendored
+1
-1
Submodule External/browserjs updated: bd20c3745e...87a9b481d1
Vendored
+1
-1
Submodule External/jack updated: ffc5ea4a6e...7b410a1323
Vendored
+1
-1
Submodule External/narwhal updated: b91ecad8a4...e0bb2640c5
Vendored
+1
-1
Submodule External/ojunit updated: ca10912c3f...e2d0cddea2
+1
-1
@@ -14,7 +14,7 @@ task :build => [:Foundation, $ENVIRONMENT_PRODUCT]
|
||||
ObjectiveJ::BundleTask.new(:Foundation) do |t|
|
||||
t.name = 'Foundation'
|
||||
t.identifier = 'com.280n.Foundation'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'Foundation classes for Cappuccino'
|
||||
|
||||
@@ -13,6 +13,9 @@ function printUsage()
|
||||
|
||||
function main()
|
||||
{
|
||||
// FIXME: ARGS
|
||||
system.args.shift();
|
||||
|
||||
if (system.args.length < 1)
|
||||
return printUsage();
|
||||
|
||||
|
||||
@@ -164,6 +164,9 @@ function preprocess(aFilePath, outFilePath, gccArgs, flags)
|
||||
|
||||
function main()
|
||||
{
|
||||
// FIXME: ARGS
|
||||
system.args.shift();
|
||||
|
||||
var filePaths = [],
|
||||
outFilePaths = [],
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ if (system.env["OBJJ_INCLUDE_PATHS"])
|
||||
|
||||
window.args = system.args;
|
||||
|
||||
// FIXME: ARGS
|
||||
system.args.shift();
|
||||
|
||||
with (window)
|
||||
{
|
||||
eval(File.read(OBJJ_HOME + "/lib/Frameworks/Objective-J/rhino.platform/Objective-J.js", { charset:"UTF-8" }));
|
||||
|
||||
+3
-1
@@ -301,7 +301,9 @@ objj_search.prototype.request = function(aFilePath, aMethod)
|
||||
|
||||
try
|
||||
{
|
||||
request.open("GET", aFilePath.replace(/\+/g, "%2B"), YES);
|
||||
// unclear whether plusses are reserved in the URI path
|
||||
//request.open("GET", aFilePath.replace(/\+/g, "%2B"), YES);
|
||||
request.open("GET", aFilePath, YES);
|
||||
request.send("");
|
||||
}
|
||||
catch (anException)
|
||||
|
||||
@@ -37,5 +37,6 @@ done
|
||||
chmod +x $INSTALL_DIR/share/objj/bin/*
|
||||
|
||||
gem install *.gem
|
||||
gem cleanup objective-j
|
||||
|
||||
echo "Cappuccino Tools Installed"
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ spec = Gem::Specification.new do |s|
|
||||
s.homepage = 'http://cappuccino.org/'
|
||||
s.summary = "Objective-J extensions to Rake."
|
||||
s.name = 'objective-j'
|
||||
s.version = "0.7.0"
|
||||
s.version = "0.7.1"
|
||||
s.requirements << 'rake'
|
||||
s.require_path = 'lib'
|
||||
s.files = PKG_FILES
|
||||
@@ -34,7 +34,7 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
||||
end
|
||||
|
||||
#task :install do
|
||||
# Gem::Installer.new(File.join($BUILD_DIR, $CONFIGURATION, 'rake', 'objective-j-0.7.0.gem')).install
|
||||
# Gem::Installer.new(File.join($BUILD_DIR, $CONFIGURATION, 'rake', 'objective-j-0.7.1.gem')).install
|
||||
#end
|
||||
|
||||
task :objj_gem => [:gem] do
|
||||
|
||||
@@ -545,6 +545,8 @@ module ObjectiveJ
|
||||
|
||||
list.each do |fileName|
|
||||
|
||||
fileName = File.expand_path(fileName)
|
||||
|
||||
File.open(fileName) do |file|
|
||||
|
||||
if fileName.index(platform_absolute_path) == 0
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ $ENVIRONMENT_LIB_PRODUCT = File.join($ENVIRONMENT_LIB_DIR, 'bake')
|
||||
ObjectiveJ::BundleTask.new(:bake) do |t|
|
||||
t.name = 'bake'
|
||||
t.identifier = 'com.280n.bake'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'Deployment tool for Cappuccino applications'
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ $ENVIRONMENT_LIB_PRODUCT = File.join($ENVIRONMENT_LIB_DIR, 'capp')
|
||||
ObjectiveJ::BundleTask.new(:capp) do |t|
|
||||
t.name = 'capp'
|
||||
t.identifier = 'com.280n.capp'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'Setup up Cappuccino projects'
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ function main()
|
||||
switch (argument)
|
||||
{
|
||||
case "version":
|
||||
case "--version": return print("capp version 0.7.0");
|
||||
case "--version": return print("capp version 0.7.1");
|
||||
|
||||
case "-h":
|
||||
case "--help": return printUsage();
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
var cell = [aCoder decodeObjectForKey:@"NSCell"];
|
||||
|
||||
_imageScaling = [cell imageScaling];
|
||||
_isEditable = [cell isEditable];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
@@ -14,7 +14,7 @@ $ENVIRONMENT_LIB_PRODUCT = File.join($ENVIRONMENT_LIB_DIR, 'nib2cib')
|
||||
ObjectiveJ::BundleTask.new(:nib2cib) do |t|
|
||||
t.name = 'nib2cib'
|
||||
t.identifier = 'com.280n.nib2cib'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'nib2cib converts Cocoa nib and xibs to Cappuccino cibs'
|
||||
|
||||
@@ -16,7 +16,7 @@ $ENVIRONMENT_BRIDGE = File.join($ENVIRONMENT_LIB_DIR, 'press', 'bridge.js')
|
||||
ObjectiveJ::BundleTask.new(:press) do |t|
|
||||
t.name = 'press'
|
||||
t.identifier = 'com.280n.press'
|
||||
t.version = '0.7.0'
|
||||
t.version = '0.7.1'
|
||||
t.author = '280 North, Inc.'
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'Deployment tool for Cappuccino applications'
|
||||
|
||||
Reference in New Issue
Block a user