add tooltips and general cleanup to Message Viewer
This commit is contained in:
parent
e5d73ecfda
commit
830f65e9b5
|
@ -340,7 +340,7 @@
|
||||||
4DFBC2DD09C0970D00D5C571 /* Torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Torrent.h; path = macosx/Torrent.h; sourceTree = "<group>"; };
|
4DFBC2DD09C0970D00D5C571 /* Torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Torrent.h; path = macosx/Torrent.h; sourceTree = "<group>"; };
|
||||||
4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
|
4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
|
||||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
|
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
|
||||||
8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
|
A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
|
||||||
A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
|
A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
|
||||||
A200B9630A227FD0007BBB1E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/InfoWindow.nib; sourceTree = "<group>"; };
|
A200B9630A227FD0007BBB1E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/InfoWindow.nib; sourceTree = "<group>"; };
|
||||||
|
|
Binary file not shown.
|
@ -820,8 +820,7 @@
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) tableView: (NSTableView *) tableView willDisplayCell: (id) cell
|
- (void) tableView: (NSTableView *) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn *) tableColumn row: (int) row
|
||||||
forTableColumn: (NSTableColumn *) tableColumn row: (int) row
|
|
||||||
{
|
{
|
||||||
if (tableView == fPeerTable)
|
if (tableView == fPeerTable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
@interface MessageWindowController (Private)
|
@interface MessageWindowController (Private)
|
||||||
|
|
||||||
|
- (NSString *) stringForMessage: (NSDictionary *) message;
|
||||||
- (void) setDebugWarningHidden: (BOOL) hide;
|
- (void) setDebugWarningHidden: (BOOL) hide;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -113,11 +114,11 @@
|
||||||
{
|
{
|
||||||
int level = currentMessage->level;
|
int level = currentMessage->level;
|
||||||
if (level == TR_MSG_ERR)
|
if (level == TR_MSG_ERR)
|
||||||
levelString = @"ERR";
|
levelString = @"Error";
|
||||||
else if (level == TR_MSG_INF)
|
else if (level == TR_MSG_INF)
|
||||||
levelString = @"INF";
|
levelString = @"Info";
|
||||||
else if (level == TR_MSG_DBG)
|
else if (level == TR_MSG_DBG)
|
||||||
levelString = @"DBG";
|
levelString = @"Debug";
|
||||||
else
|
else
|
||||||
levelString = @"???";
|
levelString = @"???";
|
||||||
|
|
||||||
|
@ -127,12 +128,7 @@
|
||||||
unsigned int loc = [[fTextView string] rangeOfString: @"\n"].location;
|
unsigned int loc = [[fTextView string] rangeOfString: @"\n"].location;
|
||||||
if (loc != NSNotFound)
|
if (loc != NSNotFound)
|
||||||
[[fTextView textStorage] deleteCharactersInRange: NSMakeRange(0, loc + 1)];
|
[[fTextView textStorage] deleteCharactersInRange: NSMakeRange(0, loc + 1)];
|
||||||
}
|
}*/
|
||||||
else
|
|
||||||
fLines++;
|
|
||||||
|
|
||||||
[[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc] initWithString:
|
|
||||||
messageString attributes: fAttributes] autorelease]];*/
|
|
||||||
|
|
||||||
#warning remove old messages?
|
#warning remove old messages?
|
||||||
|
|
||||||
|
@ -168,6 +164,12 @@
|
||||||
return [message objectForKey: @"Message"];
|
return [message objectForKey: @"Message"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) tableView: (NSTableView *) tableView toolTipForCell: (NSCell *) cell rect: (NSRectPointer) rect
|
||||||
|
tableColumn: (NSTableColumn *) column row: (int) row mouseLocation: (NSPoint) mouseLocation
|
||||||
|
{
|
||||||
|
return [self stringForMessage: [fMessages objectAtIndex: row]];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) changeLevel: (id) sender
|
- (void) changeLevel: (id) sender
|
||||||
{
|
{
|
||||||
[self updateLog: nil];
|
[self updateLog: nil];
|
||||||
|
@ -228,6 +230,16 @@
|
||||||
[string release];*/
|
[string release];*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation MessageWindowController (Private)
|
||||||
|
|
||||||
|
- (NSString *) stringForMessage: (NSDictionary *) message
|
||||||
|
{
|
||||||
|
return [NSString stringWithFormat: @"%@\n%@\n\n%@", [message objectForKey: @"Date"],
|
||||||
|
[message objectForKey: @"Level"], [message objectForKey: @"Message"]];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) setDebugWarningHidden: (BOOL) hide
|
- (void) setDebugWarningHidden: (BOOL) hide
|
||||||
{
|
{
|
||||||
[fDebugWarningField setHidden: hide];
|
[fDebugWarningField setHidden: hide];
|
||||||
|
|
Loading…
Reference in New Issue