mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
Update the message log twice as often, and when quitting set libT to stop calling the method to update the log.
This commit is contained in:
parent
8ab5e78ec2
commit
d91cd60504
1 changed files with 7 additions and 2 deletions
|
@ -29,11 +29,11 @@
|
|||
#define LEVEL_INFO 1
|
||||
#define LEVEL_DEBUG 2
|
||||
|
||||
#define UPDATE_SECONDS 1.0
|
||||
#define UPDATE_SECONDS 0.5
|
||||
|
||||
@interface MessageWindowController (Private)
|
||||
|
||||
MessageWindowController * selfReference; //I'm not sure why I can't use self directly
|
||||
MessageWindowController * selfReference; //I'm not sure why "self" can't be used directly
|
||||
|
||||
@end
|
||||
|
||||
|
@ -60,6 +60,8 @@ MessageWindowController * selfReference; //I'm not sure why I can't use self dir
|
|||
{
|
||||
[fTimer invalidate];
|
||||
|
||||
tr_setMessageFunction(NULL);
|
||||
|
||||
[fLock release];
|
||||
[fBufferArray release];
|
||||
|
||||
|
@ -118,6 +120,9 @@ void addMessage(int level, const char * message)
|
|||
|
||||
- (void) updateLog: (NSTimer *) timer
|
||||
{
|
||||
if ([fBufferArray count] == 0)
|
||||
return;
|
||||
|
||||
[fLock lock];
|
||||
|
||||
NSEnumerator * enumerator = [fBufferArray objectEnumerator];
|
||||
|
|
Loading…
Reference in a new issue