add a placeholder favicon for trackers

This commit is contained in:
Mitchell Livingston 2009-09-21 22:45:19 +00:00
parent 8fd3fd8c2a
commit cda725f49a
3 changed files with 15 additions and 10 deletions

View File

@ -124,6 +124,7 @@
A257C1820CAD3003004E121C /* PeerTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A257C1800CAD3003004E121C /* PeerTableView.m */; };
A25892640CF1F7E800CCCDDF /* StatsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A25892630CF1F7E800CCCDDF /* StatsWindowController.m */; };
A259317E0A73B2CC002F4FE7 /* TransmissionHelp in Resources */ = {isa = PBXBuildFile; fileRef = A259316A0A73B2CC002F4FE7 /* TransmissionHelp */; };
A25963E11068376200453B31 /* FavIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = A25963E01068376200453B31 /* FavIcon.png */; };
A25D2CBD0CF4C73E0096A262 /* stats.c in Sources */ = {isa = PBXBuildFile; fileRef = A25D2CBB0CF4C7190096A262 /* stats.c */; };
A25D2CBE0CF4C73E0096A262 /* stats.h in Headers */ = {isa = PBXBuildFile; fileRef = A25D2CBA0CF4C7190096A262 /* stats.h */; };
A25E03D90E4015100086C225 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
@ -551,6 +552,7 @@
A25892620CF1F7E800CCCDDF /* StatsWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatsWindowController.h; path = macosx/StatsWindowController.h; sourceTree = "<group>"; };
A25892630CF1F7E800CCCDDF /* StatsWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = StatsWindowController.m; path = macosx/StatsWindowController.m; sourceTree = "<group>"; };
A259316A0A73B2CC002F4FE7 /* TransmissionHelp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TransmissionHelp; path = macosx/TransmissionHelp; sourceTree = "<group>"; };
A25963E01068376200453B31 /* FavIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FavIcon.png; path = macosx/Images/FavIcon.png; sourceTree = "<group>"; };
A25D2CBA0CF4C7190096A262 /* stats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stats.h; path = libtransmission/stats.h; sourceTree = "<group>"; };
A25D2CBB0CF4C7190096A262 /* stats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stats.c; path = libtransmission/stats.c; sourceTree = "<group>"; };
A25E03E00E4015380086C225 /* tr-getopt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tr-getopt.h"; path = "libtransmission/tr-getopt.h"; sourceTree = "<group>"; };
@ -1070,6 +1072,7 @@
4DA6FDC3091141AD00450CB1 /* ResumeOff.png */,
4DA6FDC4091141AD00450CB1 /* ResumeOn.png */,
A2623B3D0D3DC5930045D19A /* ResumeHover.png */,
A25963E01068376200453B31 /* FavIcon.png */,
4DDFDD20099A5D8E00189D81 /* DownloadBadge.png */,
4DDFDD21099A5D8E00189D81 /* UploadBadge.png */,
A24B655F0D3F30870079EA4D /* QuitBadge.png */,
@ -1811,6 +1814,7 @@
A22F1E550E7DA8030065DB9D /* sparkle_dsa_pub.pem in Resources */,
A2E2EA920EE321C200EB6308 /* Groups.png in Resources */,
A215BF5C0F02EBB800350CDB /* GroupRules.xib in Resources */,
A25963E11068376200453B31 /* FavIcon.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -928,7 +928,7 @@ typedef enum
NSURL * address = [NSURL URLWithString: item];
NSArray * hostComponents = [[address host] componentsSeparatedByString: @"."];
//let's try getting the favicon without using any subdomains
//let's try getting the tracker address without using any subdomains
NSString * baseAddress;
if ([hostComponents count] > 1)
baseAddress = [NSString stringWithFormat: @"%@://%@.%@", [address scheme],
@ -943,7 +943,7 @@ typedef enum
[NSThread detachNewThreadSelector: @selector(loadTrackerIcon:) toTarget: self withObject: baseAddress];
}
return (icon && icon != [NSNull null]) ? icon : nil;
return (icon && icon != [NSNull null]) ? icon : [NSImage imageNamed: @"FavIcon.png"];
}
if ([ident isEqualToString: @"Address"])
return item;
@ -957,7 +957,7 @@ typedef enum
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSURL * favIconUrl = [NSURL URLWithString: [baseAddress stringByAppendingString: @"/favicon.ico"]];
NSURL * favIconUrl = [NSURL URLWithString: [baseAddress stringByAppendingPathComponent: @"favicon.ico"]];
NSImage * icon = [[NSImage alloc] initWithContentsOfURL: favIconUrl];
if (icon)
{

View File

@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1731"/>
<integer value="1823"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -2021,7 +2021,7 @@ AAB0ZXh0AAAAAENvcHlyaWdodCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA</bytes>
<object class="NSTableView" id="423972458">
<reference key="NSNextResponder" ref="198254095"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{360, 143}</string>
<string key="NSFrameSize">{363, 143}</string>
<reference key="NSSuperview" ref="198254095"/>
<bool key="NSEnabled">YES</bool>
<object class="_NSCornerView" key="NSCornerView">
@ -2033,9 +2033,9 @@ AAB0ZXh0AAAAAENvcHlyaWdodCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA</bytes>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="78872301">
<string key="NSIdentifier">Icon</string>
<double key="NSWidth">14</double>
<double key="NSMinWidth">14</double>
<double key="NSMaxWidth">14</double>
<double key="NSWidth">17</double>
<double key="NSMinWidth">17</double>
<double key="NSMaxWidth">17</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
<int key="NSCellFlags">75628096</int>
<int key="NSCellFlags2">2048</int>
@ -2058,7 +2058,7 @@ AAB0ZXh0AAAAAENvcHlyaWdodCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA</bytes>
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">33554432</int>
<reference key="NSSupport" ref="737793924"/>
<int key="NSAlign">0</int>
<int key="NSAlign">8</int>
<int key="NSScale">3</int>
<int key="NSStyle">0</int>
<bool key="NSAnimates">NO</bool>
@ -2153,6 +2153,7 @@ AAB0ZXh0AAAAAENvcHlyaWdodCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA</bytes>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {372, 15}}</string>
<reference key="NSSuperview" ref="754568592"/>
<bool key="NSEnabled">YES</bool>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="754568592"/>
<string key="NSAction">_doScroller:</string>
@ -2163,7 +2164,7 @@ AAB0ZXh0AAAAAENvcHlyaWdodCBBcHBsZSBDb21wdXRlciwgSW5jLiwgMjAwNQAAAAA</bytes>
<string key="NSFrame">{{10, 202}, {362, 145}}</string>
<reference key="NSSuperview" ref="296911506"/>
<reference key="NSNextKeyView" ref="198254095"/>
<int key="NSsFlags">530</int>
<int key="NSsFlags">658</int>
<reference key="NSVScroller" ref="964808471"/>
<reference key="NSHScroller" ref="265048045"/>
<reference key="NSContentView" ref="198254095"/>