Skip to content

Commit

Permalink
Adding fullscreen support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Nicolas Jolivet authored and Jean-Nicolas Jolivet committed May 5, 2010
1 parent 5be593e commit f4bd3aa
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 9 deletions.
69 changes: 60 additions & 9 deletions English.lproj/MainMenu.xib
Expand Up @@ -2,17 +2,17 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10C540</string>
<string key="IBDocument.SystemVersion">10D573</string>
<string key="IBDocument.InterfaceBuilderVersion">759</string>
<string key="IBDocument.AppKitVersion">1038.25</string>
<string key="IBDocument.HIToolboxVersion">458.00</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">460.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">759</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="483"/>
<integer value="339"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -738,6 +738,25 @@
<reference key="NSOnImage" ref="893455832"/>
<reference key="NSMixedImage" ref="424226900"/>
</object>
<object class="NSMenuItem" id="221295743">
<reference key="NSMenu" ref="877676881"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="893455832"/>
<reference key="NSMixedImage" ref="424226900"/>
</object>
<object class="NSMenuItem" id="249465831">
<reference key="NSMenu" ref="877676881"/>
<string key="NSTitle">Enter Fullscreen</string>
<string key="NSKeyEquiv">F</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="893455832"/>
<reference key="NSMixedImage" ref="424226900"/>
</object>
</object>
</object>
</object>
Expand Down Expand Up @@ -1255,6 +1274,14 @@
</object>
<int key="connectionID">618</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleFullscreen:</string>
<reference key="source" ref="909243075"/>
<reference key="destination" ref="249465831"/>
</object>
<int key="connectionID">621</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Expand Down Expand Up @@ -1490,6 +1517,8 @@
<reference ref="479945429"/>
<reference ref="316787670"/>
<reference ref="433804832"/>
<reference ref="221295743"/>
<reference ref="249465831"/>
</object>
<reference key="parent" ref="147235865"/>
</object>
Expand Down Expand Up @@ -1933,6 +1962,16 @@
<reference key="object" ref="433804832"/>
<reference key="parent" ref="877676881"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">619</int>
<reference key="object" ref="221295743"/>
<reference key="parent" ref="877676881"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">620</int>
<reference key="object" ref="249465831"/>
<reference key="parent" ref="877676881"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Expand Down Expand Up @@ -2061,6 +2100,8 @@
<string>611.IBPluginDependency</string>
<string>613.IBPluginDependency</string>
<string>614.IBPluginDependency</string>
<string>619.IBPluginDependency</string>
<string>620.IBPluginDependency</string>
<string>74.IBPluginDependency</string>
<string>74.ImportedFromIB2</string>
<string>77.IBPluginDependency</string>
Expand Down Expand Up @@ -2114,16 +2155,16 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{39, 517}, {448, 20}}</string>
<string>{{13, 371}, {448, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{450, 743}, {191, 93}}</string>
<string>{{279, 248}, {205, 123}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{194, 234}, {254, 283}}</string>
<string>{{194, 72}, {254, 283}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down Expand Up @@ -2163,7 +2204,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{448, 274}, {181, 63}}</string>
<string>{{448, 112}, {181, 63}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down Expand Up @@ -2198,6 +2239,8 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
Expand Down Expand Up @@ -2226,7 +2269,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">618</int>
<int key="maxID">621</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Expand Down Expand Up @@ -2393,11 +2436,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>delegate</string>
<string>tableView</string>
<string>vipObject</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>NSTableView</string>
<string>id</string>
</object>
Expand Down Expand Up @@ -2499,8 +2544,10 @@
<string>findPanelSegmentedControl:</string>
<string>noselectionSearchField:</string>
<string>openInSafari:</string>
<string>predicateEditor:</string>
<string>rightFilterGroupByMenu:</string>
<string>rightFilterSearchField:</string>
<string>toggleFullscreen:</string>
<string>toggleRightFilterBar:</string>
</object>
<object class="NSMutableArray" key="dict.values">
Expand All @@ -2520,6 +2567,8 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
Expand All @@ -2530,6 +2579,7 @@
<string>backForwardButton</string>
<string>backForwardManager</string>
<string>browserSplitView</string>
<string>browserSplitViewContainer</string>
<string>browserToolbar</string>
<string>browserTopbar</string>
<string>browserView</string>
Expand Down Expand Up @@ -2584,6 +2634,7 @@
<string>NSView</string>
<string>NSView</string>
<string>NSView</string>
<string>NSView</string>
<string>NSTextField</string>
<string>NSTextField</string>
<string>WebView</string>
Expand Down
3 changes: 3 additions & 0 deletions IGKWindowController.h
Expand Up @@ -149,6 +149,7 @@ typedef enum {
BOOL awaken;
BOOL shouldIndex;
BOOL isIndexing;
BOOL isInFullscreen;

NSManagedObjectID *currentObjectIDInBrowser;

Expand Down Expand Up @@ -188,6 +189,8 @@ typedef enum {
- (BOOL)rightFilterBarShown;
- (void)setRightFilterBarShown:(BOOL)shown;

- (IBAction)toggleFullscreen:(id)sender;

- (BOOL)filterBarTableRowIsGroup:(NSInteger)row;

- (IBAction)predicateEditor:(id)sender;
Expand Down
19 changes: 19 additions & 0 deletions IGKWindowController.m
Expand Up @@ -70,6 +70,8 @@ - (id)init
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showSavingProgressSheet:) name:@"IGKWillSaveIndex" object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(userDefaultsDidChange:) name:NSUserDefaultsDidChangeNotification object:nil];

isInFullscreen = NO;
}

return self;
Expand Down Expand Up @@ -1777,6 +1779,23 @@ - (void)setRightFilterBarShown:(BOOL)shown
}
}

- (IBAction)toggleFullscreen:(id)sender
{
if(isInFullscreen)
{
[[[self window] contentView] exitFullScreenModeWithOptions:nil];
isInFullscreen = NO;
}
else
{
[[[self window] contentView] enterFullScreenMode:[[self window] screen]
withOptions:nil];

isInFullscreen = YES;
}

}


#pragma mark Search Timeout

Expand Down

0 comments on commit f4bd3aa

Please sign in to comment.