Skip to content

Commit

Permalink
Fullscreen refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
ttscoff committed Jan 18, 2011
1 parent dae2a38 commit dfe1eb2
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 100 deletions.
8 changes: 5 additions & 3 deletions AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1666,6 +1666,9 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
//otherwise, if there are unsynced notes to send, then push them right now and wait until session is no longer running
//use waitForUncommitedChangesWithTarget:selector: and provide a callback to send NSTerminateNow

if (fullscreenWindow) {
[self toggleFullscreen:self];
}
InvocationRecorder *invRecorder = [InvocationRecorder invocationRecorder];
[[invRecorder prepareWithInvocationTarget:self] _finishSyncWait];

Expand Down Expand Up @@ -1834,7 +1837,7 @@ - (IBAction)selectPreviewMode:(id)sender
- (IBAction)toggleFullscreen:(id)sender
{
[textView setHidden:YES];

if (fullscreenWindow)
{
NSView *firstResponder = (NSView *)[fullscreenWindow firstResponder];
Expand Down Expand Up @@ -1902,7 +1905,6 @@ - (IBAction)toggleFullscreen:(id)sender
backing:NSBackingStoreBuffered
defer:YES
screen:[window screen]];

NSView *contentView = [[[window contentView] retain] autorelease];
[window setContentView:[[[NSView alloc] init] autorelease]];

Expand All @@ -1922,7 +1924,7 @@ - (IBAction)toggleFullscreen:(id)sender
display:YES
animate:YES];
NSRect screenRect = [textView frame];
NSSize viewSize = {(screenRect.size.width - 800) / 2,40};
NSSize viewSize = {(screenRect.size.width - 650) / 2,40};

[textView setTextContainerInset:viewSize];

Expand Down
209 changes: 119 additions & 90 deletions English.lproj/MainMenu.nib/designable.nib

Large diffs are not rendered by default.

Binary file modified English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
3 changes: 1 addition & 2 deletions FullscreenWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
#import <Cocoa/Cocoa.h>

@interface FullscreenWindow : NSWindow
{

{
}

@end
1 change: 1 addition & 0 deletions FullscreenWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

@implementation FullscreenWindow


- (BOOL)makeFirstResponder:(NSResponder *)aResponder
{
BOOL result = [super makeFirstResponder:aResponder];
Expand Down
8 changes: 4 additions & 4 deletions MarkupPreview.xib
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="122"/>
<integer value="157"/>
<integer value="133"/>
<integer value="3"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -1136,10 +1136,10 @@ ZQCUhAEqhIQLe0NHU2l6ZT1kZH2age8Agb0BhoY</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAADCCAAAxAIAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{432, 390}, {445, 528}}</string>
<string>{{561, 433}, {445, 528}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<string>{{432, 390}, {445, 528}}</string>
<string>{{561, 433}, {445, 528}}</string>
<boolean value="NO"/>
<boolean value="YES"/>
<string>{150, 242}</string>
Expand Down Expand Up @@ -1188,7 +1188,7 @@ ZQCUhAEqhIQLe0NHU2l6ZT1kZH2age8Agb0BhoY</bytes>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">175</int>
<int key="maxID">176</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Expand Down
2 changes: 1 addition & 1 deletion PreviewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
IBOutlet NSButton *viewOnWebButton;
BOOL isPreviewOutdated;
NSMutableData *receivedData;
// IBOutlet NSWindow *wnd;
//IBOutlet NSPanel *wnd;
MAAttachedWindow *attachedWindow;
MAAttachedWindow *confirmWindow;
IBOutlet NSTextField *urlTextField;
Expand Down
1 change: 1 addition & 0 deletions PreviewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ -(void)togglePreview:(id)sender
[tabSwitcher setTitle:@"View Source"];

[wnd orderFront:self];
[wnd setLevel:NSScreenSaverWindowLevel];
}

// save visibility to defaults
Expand Down

0 comments on commit dfe1eb2

Please sign in to comment.