show the priority images in the menu popup for files

This commit is contained in:
Mitchell Livingston 2007-09-11 19:23:14 +00:00
parent c351a19124
commit 3836abcfb8
4 changed files with 12 additions and 19 deletions

3
NEWS
View File

@ -2,12 +2,13 @@ NEWS file for Transmission <http://transmission.m0k.org/>
0.90 (2007/xx/yy) 0.90 (2007/xx/yy)
- Improved compliance with BitTorrent spec - Improved compliance with BitTorrent spec
- Multiscrape support added - Multiscrape support
- Only report downloaded, verified good pieces in tracker `download' field - Only report downloaded, verified good pieces in tracker `download' field
- OS X: - OS X:
+ Per-torrent action menu + Per-torrent action menu
+ Redesigned message log + Redesigned message log
+ Inspector can be resized vertically in Peers and Files tabs + Inspector can be resized vertically in Peers and Files tabs
+ Various smaller interface improvements
0.82 (2007/09/09) 0.82 (2007/09/09)
- Fixed bug that could limit transfer speeds - Fixed bug that could limit transfer speeds

View File

@ -101,6 +101,11 @@
//set file table //set file table
[fFileOutline setDoubleAction: @selector(revealFile:)]; [fFileOutline setDoubleAction: @selector(revealFile:)];
//set priority item images
[fFilePriorityNormal setImage: [NSImage imageNamed: @"PriorityNormal.png"]];
[fFilePriorityLow setImage: [NSImage imageNamed: @"PriorityLow.png"]];
[fFilePriorityHigh setImage: [NSImage imageNamed: @"PriorityHigh.png"]];
//set blank inspector //set blank inspector
[self updateInfoForTorrents: [NSArray array]]; [self updateInfoForTorrents: [NSArray array]];

View File

@ -30,7 +30,7 @@
#define LEVEL_DEBUG 2 #define LEVEL_DEBUG 2
#define UPDATE_SECONDS 0.6 #define UPDATE_SECONDS 0.6
#define MAX_MESSAGES 2500 #define MAX_MESSAGES 4000
@interface MessageWindowController (Private) @interface MessageWindowController (Private)
@ -70,8 +70,6 @@
[window setFrameAutosaveName: @"MessageWindowFrame"]; [window setFrameAutosaveName: @"MessageWindowFrame"];
[window setFrameUsingName: @"MessageWindowFrame"]; [window setFrameUsingName: @"MessageWindowFrame"];
[window center];
//initially sort peer table by IP //initially sort peer table by IP
if ([[fMessageTable sortDescriptors] count] == 0) if ([[fMessageTable sortDescriptors] count] == 0)
{ {
@ -95,14 +93,8 @@
[fLevelButton selectItemAtIndex: LEVEL_ERROR]; [fLevelButton selectItemAtIndex: LEVEL_ERROR];
else if (level == TR_MSG_INF) else if (level == TR_MSG_INF)
[fLevelButton selectItemAtIndex: LEVEL_INFO]; [fLevelButton selectItemAtIndex: LEVEL_INFO];
else if (level == TR_MSG_DBG)
[fLevelButton selectItemAtIndex: LEVEL_DEBUG];
else else
{ [fLevelButton selectItemAtIndex: LEVEL_DEBUG];
level = TR_MSG_ERR;
[fLevelButton selectItemAtIndex: LEVEL_ERROR];
[[NSUserDefaults standardUserDefaults] setInteger: level forKey: @"MessageLevel"];
}
[self setDebugWarningHidden: level != TR_MSG_DBG]; [self setDebugWarningHidden: level != TR_MSG_DBG];
} }
@ -121,7 +113,6 @@
tr_freeMessageList(messages); tr_freeMessageList(messages);
#warning still needed?
int total = [fMessages count]; int total = [fMessages count];
if (total > MAX_MESSAGES) if (total > MAX_MESSAGES)
{ {
@ -158,10 +149,8 @@
return fErrorImage; return fErrorImage;
else if (level == TR_MSG_INF) else if (level == TR_MSG_INF)
return fInfoImage; return fInfoImage;
else if (level == TR_MSG_DBG)
return fDebugImage;
else else
return nil; return fDebugImage;
} }
else else
return [message objectForKey: @"Message"]; return [message objectForKey: @"Message"];
@ -289,12 +278,10 @@
levelString = @"Error"; levelString = @"Error";
else if (level == TR_MSG_INF) else if (level == TR_MSG_INF)
levelString = @"Info"; levelString = @"Info";
else if (level == TR_MSG_DBG)
levelString = @"Debug";
else else
levelString = @"???"; levelString = @"Debug";
return [NSString stringWithFormat: @"%@ %@ %@", [message objectForKey: @"Date"], levelString, [message objectForKey: @"Message"]]; return [NSString stringWithFormat: @"%@ [%@] %@", [message objectForKey: @"Date"], levelString, [message objectForKey: @"Message"]];
} }
- (void) setDebugWarningHidden: (BOOL) hide - (void) setDebugWarningHidden: (BOOL) hide