Skip to content
Snippets Groups Projects
Commit c302b92b authored by George Nachman's avatar George Nachman
Browse files

Adhoc build 3.0.20160907_212045

parent 0ee97d2a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -78,6 +78,12 @@
 
#pragma mark - Creation/Destruction
 
- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p frame=%@ inOverflow=%@ count=%@ isPlaceholder=%@ string=\"%@\">",
NSStringFromClass([self class]), self, NSStringFromRect(self.frame), @(self.isInOverflowMenu), @(self.count),
@(self.isPlaceholder), self.attributedStringValue.string];
}
- (id)initWithControlView:(PSMTabBarControl *)controlView {
if ((self = [super init])) {
[self setControlView:controlView];
Loading
Loading
Loading
Loading
@@ -217,4 +217,7 @@ enum {
 
- (void)setTabsHaveCloseButtons:(BOOL)tabsHaveCloseButtons;
 
- (void)logCells;
+ (NSString *)cellLog;
@end
Loading
Loading
@@ -15,7 +15,7 @@
#import "PSMTabDragAssistant.h"
#import "PTYTask.h"
#import "NSWindow+PSM.h"
#include <sys/time.h>
NSString *const kPSMModifierChangedNotification = @"kPSMModifierChangedNotification";
NSString *const kPSMTabModifierKey = @"TabModifier";
NSString *const PSMTabDragDidEndNotification = @"PSMTabDragDidEndNotification";
Loading
Loading
@@ -416,10 +416,13 @@ const NSInteger kPSMStartResizeAnimation = 0;
[self initializeStateForCell:cell];
[self bindPropertiesForCell:cell andTabViewItem:item];
[cell release];
[self logCells];
}
 
- (void)addTabViewItem:(NSTabViewItem *)item {
[self addTabViewItem:item atIndex:[_cells count]];
[self logCells];
}
 
- (void)removeTabForCell:(PSMTabBarCell *)cell {
Loading
Loading
@@ -446,6 +449,7 @@ const NSInteger kPSMStartResizeAnimation = 0;
 
// pull from collection
[_cells removeObject:cell];
[self logCells];
}
 
#pragma mark -
Loading
Loading
@@ -721,6 +725,7 @@ const NSInteger kPSMStartResizeAnimation = 0;
}
 
[self update:YES];
[self logCells];
}
 
- (void)update
Loading
Loading
@@ -2119,4 +2124,24 @@ const NSInteger kPSMStartResizeAnimation = 0;
[self update];
}
 
NSMutableArray *sCellLog;
- (void)logCells {
struct timeval tv;
gettimeofday(&tv, NULL);
NSString *logEntry = [NSString stringWithFormat:@"%lld.%06lld control=%@ cells=%@ Stack Trace:\n%@",
(long long)tv.tv_sec, (long long)tv.tv_usec, self, _cells, [NSThread callStackSymbols]];
if (!sCellLog) {
sCellLog = [[NSMutableArray alloc] init];
}
[sCellLog addObject:logEntry];
if ([sCellLog count] > 10000) {
[sCellLog removeObjectAtIndex:0];
}
}
+ (NSString *)cellLog {
return [sCellLog componentsJoinedByString:@"\n\n"];
}
@end
Loading
Loading
@@ -512,7 +512,8 @@ static PSMTabDragAssistant *sharedDragAssistant = nil;
}
//add the dragged tab to the new window
[[control cells] insertObject:[self draggedCell] atIndex:0];
[control logCells];
//remove the tracking rects and bindings registered on the old tab
[[self sourceTabBar] removeTrackingRect:[[self draggedCell] closeButtonTrackingTag]];
[[self sourceTabBar] removeTrackingRect:[[self draggedCell] cellTrackingTag]];
Loading
Loading
@@ -790,6 +791,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil;
pc.truncationStyle = truncationStyle;
if ([[control cells] count] > (2 * numVisibleTabs)) {
[[control cells] insertObject:pc atIndex:(2 * numVisibleTabs)];
[control logCells];
} else {
[[control cells] addObject:pc];
}
Loading
Loading
Loading
Loading
@@ -10,6 +10,7 @@
#import "iTermApplication.h"
#import "NSView+RecursiveDescription.h"
#import <Cocoa/Cocoa.h>
#import "PSMTabBarControl.h"
 
#include <sys/time.h>
 
Loading
Loading
@@ -36,13 +37,15 @@ static void WriteDebugLogHeader() {
@"Key window: %@\n"
@"Windows: %@\n"
@"Ordered windows: %@\n"
@"Cell log:\n%@"
@"------ END HEADER ------\n\n",
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"],
[NSDate date],
(long long)[[NSDate date] timeIntervalSince1970],
[[NSApplication sharedApplication] keyWindow],
windows,
[(iTermApplication *)NSApp orderedWindowsPlusAllHotkeyPanels]];
[(iTermApplication *)NSApp orderedWindowsPlusAllHotkeyPanels],
[PSMTabBarControl cellLog]];
[gDebugLogHeader release];
gDebugLogHeader = [header copy];
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment