Merge 1c4ccccf76
into 5ca4fd7985
This commit is contained in:
commit
2ae10adae6
5 changed files with 164 additions and 15 deletions
|
@ -16,6 +16,10 @@
|
|||
#import "NSData+Base64.h"
|
||||
#import "MimeType.h"
|
||||
|
||||
@interface NSWindow (FullScreen)
|
||||
- (BOOL)mn_isFullScreen;
|
||||
@end
|
||||
|
||||
@interface Controller : NSObject <GrowlApplicationBridgeDelegate> {
|
||||
IBOutlet WebView *timelineView;
|
||||
IBOutlet NSWindow *timelineViewWindow;
|
||||
|
@ -31,7 +35,10 @@
|
|||
ViewDelegate *viewDelegate;
|
||||
WebView *oauthView;
|
||||
AccessToken *accessToken;
|
||||
|
||||
NSSplitView *FullscreenMain;
|
||||
IBOutlet NSMenuItem *MinimizeMenuItem;
|
||||
IBOutlet NSMenuItem *MentionsWindowMenuItem;
|
||||
IBOutlet NSMenuItem *TimelineWindowMenuItem;
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) IBOutlet WebView *timelineView;
|
||||
|
@ -48,7 +55,7 @@
|
|||
@property (retain, nonatomic) IBOutlet ViewDelegate *viewDelegate;
|
||||
@property (retain, nonatomic) WebView *oauthView;
|
||||
@property (retain, nonatomic) AccessToken *accessToken;
|
||||
|
||||
@property (assign) IBOutlet NSSplitView *FullscreenMain;
|
||||
|
||||
- (void)initOauth;
|
||||
- (void)authentificationSucceded:(id)sender;
|
||||
|
|
|
@ -11,7 +11,15 @@
|
|||
#import "PostModel.h"
|
||||
#import "NSData+Base64.h"
|
||||
|
||||
@implementation NSWindow (FullScreen)
|
||||
- (BOOL)mn_isFullScreen
|
||||
{
|
||||
return (([self styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask);
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation Controller
|
||||
@synthesize FullscreenMain;
|
||||
@synthesize loginViewWindow;
|
||||
@synthesize loginEntityTextField;
|
||||
@synthesize loginActivityIndicator;
|
||||
|
@ -423,13 +431,48 @@
|
|||
[accessToken setString:nil forKey:@"entity"];
|
||||
}
|
||||
|
||||
// Mentions window has been visible
|
||||
// Mentions window has been visible + Changes for better fullscreen mode
|
||||
- (void)windowDidBecomeKey:(NSNotification *)notification
|
||||
{
|
||||
if ([notification object] == mentionsViewWindow)
|
||||
{
|
||||
[self unreadMentions:0];
|
||||
}
|
||||
[self unreadMentions:0];
|
||||
}
|
||||
else if (([notification object] == conversationViewWindow) && ((timelineViewWindow.mn_isFullScreen) || (mentionsViewWindow.mn_isFullScreen)))
|
||||
{
|
||||
[conversationViewWindow setLevel:NSModalPanelWindowLevel];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowWillEnterFullScreen:(NSNotification *)notification
|
||||
{
|
||||
[TimelineWindowMenuItem setEnabled:NO];
|
||||
[MentionsWindowMenuItem setEnabled:NO];
|
||||
[MinimizeMenuItem setEnabled:NO];
|
||||
if ([notification object] == mentionsViewWindow){
|
||||
[timelineViewWindow close];
|
||||
} else {
|
||||
[mentionsViewWindow close];
|
||||
}
|
||||
[timelineView removeFromSuperview];
|
||||
[mentionsView removeFromSuperview];
|
||||
[FullscreenMain addSubview:timelineView];
|
||||
[FullscreenMain addSubview:mentionsView];
|
||||
[FullscreenMain setFrame:[[[notification object] contentView] bounds]];
|
||||
[[[notification object] contentView] addSubview:FullscreenMain];
|
||||
[FullscreenMain setPosition:([[[notification object] contentView] bounds].size.width/2) ofDividerAtIndex:0];
|
||||
}
|
||||
|
||||
- (void)windowWillExitFullScreen:(NSNotification *)notification
|
||||
{
|
||||
[TimelineWindowMenuItem setEnabled:YES];
|
||||
[MentionsWindowMenuItem setEnabled:YES];
|
||||
[MinimizeMenuItem setEnabled:YES];
|
||||
[timelineView setFrame:[[timelineViewWindow contentView] bounds]];
|
||||
[mentionsView setFrame:[[mentionsViewWindow contentView] bounds]];
|
||||
[FullscreenMain removeFromSuperview];
|
||||
[[timelineViewWindow contentView] addSubview:timelineView];
|
||||
[[mentionsViewWindow contentView] addSubview:mentionsView];
|
||||
}
|
||||
|
||||
- (void)getTweetUpdates:(id)sender
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<string>NSMenu</string>
|
||||
<string>NSMenuItem</string>
|
||||
<string>NSProgressIndicator</string>
|
||||
<string>NSSplitView</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextFieldCell</string>
|
||||
<string>NSUserDefaultsController</string>
|
||||
|
@ -775,6 +776,7 @@
|
|||
</object>
|
||||
</object>
|
||||
<string key="NSName">_NSWindowsMenu</string>
|
||||
<bool key="NSNoAutoenable">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMenuItem" id="1050483726">
|
||||
|
@ -874,9 +876,10 @@
|
|||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="690752143"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<string key="NSFrameAutosaveName">tentia</string>
|
||||
<int key="NSWindowCollectionBehavior">128</int>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="751227585">
|
||||
|
@ -943,9 +946,10 @@
|
|||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="126069112"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<string key="NSFrameAutosaveName">mentions</string>
|
||||
<int key="NSWindowCollectionBehavior">128</int>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="919859780">
|
||||
|
@ -958,7 +962,7 @@
|
|||
<nil key="NSViewClass"/>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="469460548">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
|
@ -988,6 +992,7 @@
|
|||
</object>
|
||||
<string key="NSFrameSize">{376, 581}</string>
|
||||
<reference key="NSSuperview" ref="469460548"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="FrameName"/>
|
||||
<string key="GroupName"/>
|
||||
|
@ -997,11 +1002,14 @@
|
|||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{376, 581}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="352293288"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<string key="NSFrameAutosaveName">conversations</string>
|
||||
<int key="NSWindowCollectionBehavior">256</int>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="842998572">
|
||||
|
@ -1140,7 +1148,6 @@
|
|||
<string key="NSFrame">{{391, 46}, {75, 32}}</string>
|
||||
<reference key="NSSuperview" ref="503676418"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="54847478">
|
||||
|
@ -1177,14 +1184,28 @@
|
|||
<reference key="NSNextKeyView" ref="433812480"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:20</string>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<string key="NSFrameAutosaveName">preferences</string>
|
||||
<int key="NSWindowCollectionBehavior">256</int>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSUserDefaultsController" id="863857937">
|
||||
<bool key="NSSharedInstance">YES</bool>
|
||||
</object>
|
||||
<object class="NSSplitView" id="492634280">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<string key="NSFrameSize">{163, 96}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSIsVertical">YES</bool>
|
||||
<int key="NSDividerStyle">3</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
|
@ -1645,6 +1666,38 @@
|
|||
</object>
|
||||
<int key="connectionID">643</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">FullscreenMain</string>
|
||||
<reference key="source" ref="408500656"/>
|
||||
<reference key="destination" ref="492634280"/>
|
||||
</object>
|
||||
<int key="connectionID">661</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">TimelineWindowMenuItem</string>
|
||||
<reference key="source" ref="408500656"/>
|
||||
<reference key="destination" ref="722386865"/>
|
||||
</object>
|
||||
<int key="connectionID">663</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">MentionsWindowMenuItem</string>
|
||||
<reference key="source" ref="408500656"/>
|
||||
<reference key="destination" ref="33537070"/>
|
||||
</object>
|
||||
<int key="connectionID">664</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">MinimizeMenuItem</string>
|
||||
<reference key="source" ref="408500656"/>
|
||||
<reference key="destination" ref="802291834"/>
|
||||
</object>
|
||||
<int key="connectionID">665</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">makeKeyAndOrderFront:</string>
|
||||
|
@ -1653,6 +1706,14 @@
|
|||
</object>
|
||||
<int key="connectionID">656</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="1010634651"/>
|
||||
<reference key="destination" ref="408500656"/>
|
||||
</object>
|
||||
<int key="connectionID">662</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">checkForUpdates:</string>
|
||||
|
@ -2488,6 +2549,14 @@
|
|||
<reference key="object" ref="687127612"/>
|
||||
<reference key="parent" ref="730994513"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">658</int>
|
||||
<reference key="object" ref="492634280"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
|
@ -2606,6 +2675,7 @@
|
|||
<string>653.IBPluginDependency</string>
|
||||
<string>654.IBPluginDependency</string>
|
||||
<string>657.IBPluginDependency</string>
|
||||
<string>658.IBPluginDependency</string>
|
||||
<string>72.IBPluginDependency</string>
|
||||
<string>73.IBPluginDependency</string>
|
||||
<string>79.IBPluginDependency</string>
|
||||
|
@ -2733,6 +2803,7 @@
|
|||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
|
@ -2747,7 +2818,7 @@
|
|||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">657</int>
|
||||
<int key="maxID">665</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -2791,6 +2862,10 @@
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>FullscreenMain</string>
|
||||
<string>MentionsWindowMenuItem</string>
|
||||
<string>MinimizeMenuItem</string>
|
||||
<string>TimelineWindowMenuItem</string>
|
||||
<string>conversationView</string>
|
||||
<string>conversationViewWindow</string>
|
||||
<string>globalHotkeyMenuItem</string>
|
||||
|
@ -2806,6 +2881,10 @@
|
|||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSSplitView</string>
|
||||
<string>NSMenuItem</string>
|
||||
<string>NSMenuItem</string>
|
||||
<string>NSMenuItem</string>
|
||||
<string>WebView</string>
|
||||
<string>NSWindow</string>
|
||||
<string>NSMenuItem</string>
|
||||
|
@ -2824,6 +2903,10 @@
|
|||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>FullscreenMain</string>
|
||||
<string>MentionsWindowMenuItem</string>
|
||||
<string>MinimizeMenuItem</string>
|
||||
<string>TimelineWindowMenuItem</string>
|
||||
<string>conversationView</string>
|
||||
<string>conversationViewWindow</string>
|
||||
<string>globalHotkeyMenuItem</string>
|
||||
|
@ -2839,6 +2922,22 @@
|
|||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">FullscreenMain</string>
|
||||
<string key="candidateClassName">NSSplitView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">MentionsWindowMenuItem</string>
|
||||
<string key="candidateClassName">NSMenuItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">MinimizeMenuItem</string>
|
||||
<string key="candidateClassName">NSMenuItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">TimelineWindowMenuItem</string>
|
||||
<string key="candidateClassName">NSMenuItem</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">conversationView</string>
|
||||
<string key="candidateClassName">WebView</string>
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
<string key="NSFrame">{{257, 2}, {38, 17}}</string>
|
||||
<reference key="NSSuperview" ref="568628114"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="894039108">
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
|
@ -170,6 +169,7 @@
|
|||
<string key="NSFrameAutosaveName">newPost</string>
|
||||
<bool key="NSAutorecalculatesContentBorderThicknessMinY">NO</bool>
|
||||
<double key="NSContentBorderThicknessMinY">22</double>
|
||||
<int key="NSWindowCollectionBehavior">256</int>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="796877042">
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.4.0</string>
|
||||
<string>0.4.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
|
@ -57,7 +57,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.4.0</string>
|
||||
<string>0.4.1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.lifestyle</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
|
Reference in a new issue