Permalink
Browse files

When the plugin is first loaded, pretend the main window just appeare…

…d, so that outline view background settings are picked up. Also, when splitting the window, close the drawer we get the outline from.
  • Loading branch information...
belkadan committed Jun 29, 2011
1 parent 4e35b9f commit 623e6215277bbc4b3259ce5e9b7ffac320c4867e
Showing with 3 additions and 0 deletions.
  1. +1 −0 Classes/MDMissingDrawer.m
  2. +2 −0 Classes/NSWindowController+MDAdditions.m
@@ -90,6 +90,7 @@ - (id)initWithPlugInController:(id<TMPlugInController>)aController {
[self _injectPluginMethods];
[[[NSApp mainWindow] windowController] MD_splitWindowIfNeeded];
[[[NSApp mainWindow] windowController] MD_windowDidBecomeMain:nil];
[self _installMenuItems];
[self _injectPreferenceMethods];
}
@@ -43,6 +43,8 @@ - (void)MD_splitWindowIfNeeded {
// with one that uses the MissingDrawer.
NSDrawer *drawer = [[window drawers] objectAtIndex:0];
if (drawer) {
[drawer close]; // does no harm if the drawer is already closed
NSView *leftView = [[drawer contentView] retain];
[drawer setContentView:nil];
[window setContentView:nil];

0 comments on commit 623e621

Please sign in to comment.