Permalink
Browse files

added more hosts to result list; to no avail

  • Loading branch information...
1 parent 22e3c9d commit cf9a041abfd7705c06c384e031949af8c522887e Andreas Fuchs committed Nov 4, 2006
Showing with 209 additions and 446 deletions.
  1. +1 −14 Info.plist
  2. +14 −8 QSSSHPlugin.m
  3. +69 −96 QSSSHPlugin.xcodeproj/asf.mode1
  4. +123 −328 QSSSHPlugin.xcodeproj/asf.pbxuser
  5. +2 −0 QSSSHPlugin.xcodeproj/project.pbxproj
View
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleVersion</key>
- <string>22</string>
+ <string>2E</string>
<key>NSPrincipalClass</key>
<string>QSSSHPlugin</string>
<key>QSActions</key>
@@ -57,17 +57,6 @@
<key>relatedBundles</key>
<array/>
</dict>
- <key>QSPresetAdditions</key>
- <array>
- <dict>
- <key>ID</key>
- <string>QSPresetQSSSHPlugin</string>
- <key>name</key>
- <string>SSH hosts</string>
- <key>source</key>
- <string>QSSSHPlugin</string>
- </dict>
- </array>
<key>QSRegistration</key>
<dict>
<key>QSBundleChildHandlers</key>
@@ -79,8 +68,6 @@
<dict>
<key>QSSSHHostIDType</key>
<string>QSSSHPluginSource</string>
- <key>QSSSHPluginType</key>
- <string>QSSSHPluginSource</string>
</dict>
<key>QSObjectSources</key>
<dict>
View
@@ -13,7 +13,7 @@
@implementation QSSSHPlugin
- (BOOL)indexIsValidFromDate:(NSDate *)indexDate forEntry:(NSDictionary *)theEntry{
- NSDate *modDate=[[[NSFileManager defaultManager] fileAttributesAtPath:[@"~/.ssh/config" stringByStandardizingPath] traverseLink:YES]fileModificationDate];
+ NSDate *modDate=[[[NSFileManager defaultManager] fileAttributesAtPath:[@"~/.ssh/known_hosts" stringByStandardizingPath] traverseLink:YES]fileModificationDate];
return [modDate compare:indexDate]==NSOrderedAscending;
}
@@ -25,18 +25,24 @@ - (NSString *)identifierForObject:(id <QSObject>)object{
return [@"[SSH Host]:"stringByAppendingString:[object objectForType:QSSSHHostIDType]];
}
++ (QSObject *)newHostEntry:(NSString *)name {
+ NSLog(@"returning one object %s!\n", name);
+
+ QSObject *obj = [QSObject objectWithName:name];
+ [obj setObject:[@"ssh://" stringByAppendingString:[name stringByAppendingString: @"/"]] forType:QSURLType];
+ [obj setPrimaryType:QSSSHHostIDType];
+
+ return obj;
+}
+
- (NSArray *) objectsForEntry:(NSDictionary *)theEntry{
NSMutableArray *objects=[NSMutableArray arrayWithCapacity:1];
QSObject *newObject;
- newObject=[QSObject objectWithName:@"boojum.boinkor.net"];
-
- [newObject setObject:@"ssh://boojum.boinkor.net/" forType:QSURLType];
- [newObject setPrimaryType:QSSSHHostIDType];
- [objects addObject:newObject];
+ [objects addObject: [QSSSHPlugin newHostEntry:@"boojum.boinkor.net"]];
+ [objects addObject: [QSSSHPlugin newHostEntry:@"p.sil.at"]];
+ [objects addObject: [QSSSHPlugin newHostEntry:@"common-lisp.net"]];
- NSLog(@"returning one object!\n");
-
return objects;
}
Oops, something went wrong.

0 comments on commit cf9a041

Please sign in to comment.