[welly commit] r166 - in trunk: . Welly.xcodeproj zh_CN.lproj/MainMenu.nib

2 views
Skip to first unread message

codesite...@google.com

unread,
Aug 15, 2008, 9:06:14 AM8/15/08
to we...@googlegroups.com
Author: K.O.ed99
Date: Fri Aug 15 06:05:05 2008
New Revision: 166

Modified:
trunk/KOTerminalFeeder.m
trunk/Welly.xcodeproj/project.pbxproj
trunk/YLView.h
trunk/YLView.m
trunk/zh_CN.lproj/MainMenu.nib/designable.nib
trunk/zh_CN.lproj/MainMenu.nib/keyedobjects.nib

Log:
- add a new KOEffectView, for future CA effects
- now add a box animation to emphasize the ip address

Modified: trunk/KOTerminalFeeder.m
==============================================================================
--- trunk/KOTerminalFeeder.m (original)
+++ trunk/KOTerminalFeeder.m Fri Aug 15 06:05:05 2008
@@ -3,7 +3,7 @@
// Welly
//
// Created by K.O.ed on 08-8-11.
-// Copyright 2008 __MyCompanyName__. All rights reserved.
+// Copyright 2008 Welly Group. All rights reserved.
//

#import "KOTerminalFeeder.h"

Modified: trunk/Welly.xcodeproj/project.pbxproj
==============================================================================
--- trunk/Welly.xcodeproj/project.pbxproj (original)
+++ trunk/Welly.xcodeproj/project.pbxproj Fri Aug 15 06:05:05 2008
@@ -31,6 +31,7 @@
5A38820D0E1D44E60098FA04 /* AppKit.framework in Frameworks */ = {isa =
PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
5A39229E0E1E041300D9ABC1 /* Growl-WithInstaller.framework in Frameworks
*/ = {isa = PBXBuildFile; fileRef = 5A39229D0E1E041300D9ABC1 /*
Growl-WithInstaller.framework */; };
5A3922BA0E1E042400D9ABC1 /* Growl-WithInstaller.framework in CopyFiles
*/ = {isa = PBXBuildFile; fileRef = 5A39229D0E1E041300D9ABC1 /*
Growl-WithInstaller.framework */; };
+ 5A4B02890E55941D00260486 /* KOEffectView.m in Sources */ = {isa =
PBXBuildFile; fileRef = 5A4B02880E55941D00260486 /* KOEffectView.m */; };
5A56C3820E342CFF00082312 /* KOPostDownloader.m in Sources */ = {isa =
PBXBuildFile; fileRef = 5A56C3810E342CFF00082312 /* KOPostDownloader.m */;
};
5A7B3F780E2297CD006C1466 /* Quartz.framework in Frameworks */ = {isa =
PBXBuildFile; fileRef = 5A7B3F770E2297CD006C1466 /* Quartz.framework */; };
5A7B419B0E229955006C1466 /* PDFKit.framework in Frameworks */ = {isa =
PBXBuildFile; fileRef = 5A7B419A0E229955006C1466 /* PDFKit.framework */; };
@@ -139,6 +140,8 @@
5A309A7B0D9A252B00970494 /* zh_CN */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = zh_CN; path =
zh_CN.lproj/MainMenu.nib; sourceTree = "<group>"; };
5A309A7C0D9A252B00970494 /* zh_CN */ = {isa = PBXFileReference;
lastKnownFileType = wrapper.nib; name = zh_CN; path =
zh_CN.lproj/Preferences.nib; sourceTree = "<group>"; };
5A39229D0E1E041300D9ABC1 /* Growl-WithInstaller.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; path
= "Growl-WithInstaller.framework"; sourceTree = "<group>"; };
+ 5A4B02870E55941D00260486 /* KOEffectView.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
KOEffectView.h; sourceTree = "<group>"; };
+ 5A4B02880E55941D00260486 /* KOEffectView.m */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path =
KOEffectView.m; sourceTree = "<group>"; };
5A56C3800E342CFF00082312 /* KOPostDownloader.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = KOPostDownloader.h; sourceTree = "<group>"; };
5A56C3810E342CFF00082312 /* KOPostDownloader.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = KOPostDownloader.m; sourceTree = "<group>"; };
5A7B3F770E2297CD006C1466 /* Quartz.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Quartz.framework; path =
SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Quartz.framework; sourceTree
= DEVELOPER_DIR; };
@@ -446,6 +449,8 @@
children = (
858A54E40CAE78C8000E1AA7 /* YLMarkedTextView.h */,
858A54E50CAE78C8000E1AA7 /* YLMarkedTextView.m */,
+ 5A4B02870E55941D00260486 /* KOEffectView.h */,
+ 5A4B02880E55941D00260486 /* KOEffectView.m */,
8570AD5D0A3923A900838442 /* YLView.h */,
8570AD5E0A3923A900838442 /* YLView.m */,
166D62AB0E2E17A900514885 /* XIPortal.h */,
@@ -604,6 +609,7 @@
81F8ED1E0E500E9F0022FA65 /* LLFullScreenProcessor.m in Sources */,
819586620E5183E200AFBFCE /* LLTelnetProcessor.m in Sources */,
1600D7AF0E51C2B100496E3E /* KOTerminalFeeder.m in Sources */,
+ 5A4B02890E55941D00260486 /* KOEffectView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

Modified: trunk/YLView.h
==============================================================================
--- trunk/YLView.h (original)
+++ trunk/YLView.h Fri Aug 15 06:05:05 2008
@@ -12,7 +12,9 @@
@class YLTerminal;
@class YLConnection;
@class YLMarkedTextView;
+@class KOEffectView;
@class XIPortal;
+@class XIIntegerArray;

@interface YLView : NSTabView <NSTextInput> {
CGFloat _fontWidth;
@@ -29,11 +31,14 @@
NSRange _markedRange;

IBOutlet YLMarkedTextView *_textField;
+ IBOutlet KOEffectView *_effectView;

int _selectionLocation;
int _selectionLength;

XIPortal *_portal;
+
+ XIIntegerArray *_ipTrackingRects;
}

- (void) configure ;
@@ -80,7 +85,8 @@
- (void)updatePortal;

/* ip seeker */
-- (void) updateIPStateForRow: (int) r;
+- (void)updateIPStateForRow: (int) r;
+- (void)clearIPState;
- (void)addToolTip: (NSString *)tooltip
row: (int)r
column: (int)c

Modified: trunk/YLView.m
==============================================================================
--- trunk/YLView.m (original)
+++ trunk/YLView.m Fri Aug 15 06:05:05 2008
@@ -17,6 +17,7 @@
#import "XIPortal.h"
#import "XIIntegerArray.h"
#import "IPSeeker.h"
+#import "KOEffectView.h"
#include "encoding.h"


@@ -198,6 +199,8 @@
[self configure];
_selectionLength = 0;
_selectionLocation = 0;
+
+ _ipTrackingRects = [[XIIntegerArray alloc] init];
}
return self;
}
@@ -997,7 +1000,7 @@
}

// added by K.O.ed @ 9#: update ip status
- [self removeAllToolTips];
+ [self clearIPState];
for (y = 0; y < gRow; y++) {
[self updateIPStateForRow: y];
}
@@ -1641,6 +1644,17 @@
_portal = [[XIPortal alloc] initWithView:self];
}

+#pragma mark -
+#pragma mark ip seeker
+- (void)mouseEntered:(NSEvent *)theEvent {
+ NSRect rect = [[theEvent trackingArea] rect];
+ [_effectView drawBox: rect];
+}
+
+- (void)mouseExited:(NSEvent *)theEvent {
+ [_effectView clear];
+}
+
- (void)addToolTip: (NSString *)tooltip
row: (int)r
column: (int)c
@@ -1648,8 +1662,9 @@
/* ip tooltip */
NSRect rect = NSMakeRect(c * _fontWidth, (gRow - 1 - r) * _fontHeight,
_fontWidth * length, _fontHeight);
- NSLog(@"addToolTip: %@ row: %d column: %d length: %d", tooltip, r, c,
length);
[self addToolTipRect: rect owner: self userData: [tooltip retain]];
+ NSTrackingRectTag rectTag = [self addTrackingRect: rect owner: self
userData: [tooltip retain] assumeInside: YES];
+ [_ipTrackingRects push_back: rectTag];
}

- (void) updateIPStateForRow: (int) r {
@@ -1709,6 +1724,21 @@
}
}
}
+
+/*
+ * clear all ip areas
+ */
+- (void)clearIPState {
+ [_effectView clear];
+ // remove all tool tips
+ [self removeAllToolTips];
+ // remove all ip tracking rects
+ while(![_ipTrackingRects empty]) {
+ NSTrackingRectTag rectTag = (NSTrackingRectTag)[_ipTrackingRects front];
+ [self removeTrackingRect:rectTag];
+ [_ipTrackingRects pop_front];
+ }
+}
@end

@implementation NSObject(NSToolTipOwner)
@@ -1716,34 +1746,6 @@
stringForToolTip: (NSToolTipTag)tag
point: (NSPoint)point
userData: (void *)userData {
- /*
- NSString *u = (NSString *)userData;
- NSArray* components = [u componentsSeparatedByString:@"."];
- NSMutableData* data = [NSMutableData dataWithLength:4];
- NSString *loc = @"";
- if([components count] == 4) {
- char* ip = (char*)[data mutableBytes];
- int value = [[components objectAtIndex:0] intValue];
- if(value > 255 || value < 0)
- return @"";
- ip[0] = value & 0xFF;
- value = [[components objectAtIndex:1] intValue];
- if(value > 255 || value < 0)
- return @"";
- ip[1] = value & 0xFF;
- value = [[components objectAtIndex:2] intValue];
- if(value > 255 || value < 0)
- return @"";
- ip[2] = value & 0xFF;
- value = [[components objectAtIndex:3] intValue];
- if(value > 255 || value < 0)
- return @"";
- ip[3] = value & 0xFF;
- loc = [[IPSeeker shared] getLocation:ip];
- }
- //NSString *loc = [[IPSeeker shared] getLocation: [(NSString *)userData
UTF8String]];
- [u release];
- return [loc retain];*/
return (NSString *)userData;
}
@end

Modified: trunk/zh_CN.lproj/MainMenu.nib/designable.nib
==============================================================================
--- trunk/zh_CN.lproj/MainMenu.nib/designable.nib (original)
+++ trunk/zh_CN.lproj/MainMenu.nib/designable.nib Fri Aug 15 06:05:05 2008
@@ -637,6 +637,14 @@
<reference key="NSSuperview" ref="92983356"/>
<string key="NSClassName">YLMarkedTextView</string>
</object>
+ <object class="NSCustomView" id="571244695">
+ <reference key="NSNextResponder" ref="92983356"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{101, 434}, {163, 96}}</string>
+ <reference key="NSSuperview" ref="92983356"/>
+ <bool key="NSViewIsLayerTreeHost">YES</bool>
+ <string key="NSClassName">KOEffectView</string>
+ </object>
</object>
<string key="NSFrame">{{1, 0}, {960, 576}}</string>
<reference key="NSSuperview" ref="957750958"/>
@@ -4751,6 +4759,22 @@
</object>
<int key="connectionID">1163</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">mainView</string>
+ <reference key="source" ref="571244695"/>
+ <reference key="destination" ref="92983356"/>
+ </object>
+ <int key="connectionID">1166</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_effectView</string>
+ <reference key="source" ref="92983356"/>
+ <reference key="destination" ref="571244695"/>
+ </object>
+ <int key="connectionID">1167</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -4807,6 +4831,7 @@
<reference key="object" ref="92983356"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="571244695"/>
<reference ref="388583076"/>
</object>
<reference key="parent" ref="957750958"/>
@@ -6362,11 +6387,6 @@
<reference key="parent" ref="82300272"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">227</int>
- <reference key="object" ref="388583076"/>
- <reference key="parent" ref="92983356"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">325</int>
<reference key="object" ref="923489522"/>
<reference key="parent" ref="1022451807"/>
@@ -6391,6 +6411,16 @@
<reference key="object" ref="1004713283"/>
<reference key="parent" ref="332582478"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1165</int>
+ <reference key="object" ref="571244695"/>
+ <reference key="parent" ref="92983356"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">227</int>
+ <reference key="object" ref="388583076"/>
+ <reference key="parent" ref="92983356"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -6461,6 +6491,7 @@
<string>1157.IBPluginDependency</string>
<string>1158.IBPluginDependency</string>
<string>1161.IBPluginDependency</string>
+ <string>1165.IBPluginDependency</string>
<string>129.IBPluginDependency</string>
<string>129.ImportedFromIB2</string>
<string>130.IBPluginDependency</string>
@@ -6765,6 +6796,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
@@ -6817,11 +6849,11 @@
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{42, 111}, {960, 598}}</string>
+ <string>{{259, 111}, {960, 598}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <reference ref="9"/>
- <string>{{42, 111}, {960, 598}}</string>
+ <integer value="0"/>
+ <string>{{259, 111}, {960, 598}}</string>
<reference ref="9"/>
<reference ref="9"/>
<string>{{197, 144}, {960, 598}}</string>
@@ -7072,7 +7104,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1163</int>
+ <int key="maxID">1167</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -7086,6 +7118,22 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">KOEffectView</string>
+ <string key="superclassName">NSView</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">addNewLayer:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">mainView</string>
+ <string key="NS.object.0">YLView</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">KOEffectView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSMenuItem</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -7401,8 +7449,17 @@
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">_textField</string>
- <string key="NS.object.0">YLMarkedTextView</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>_effectView</string>
+ <string>_textField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>KOEffectView</string>
+ <string>YLMarkedTextView</string>
+ </object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>

Modified: trunk/zh_CN.lproj/MainMenu.nib/keyedobjects.nib
==============================================================================
Binary files. No diff available.

Reply all
Reply to author
Forward
0 new messages