mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-23 01:09:42 +01:00
Show Lion full-screen toggle if on Lion
This commit is contained in:
parent
5750f51bdd
commit
36738fc9e4
@ -43,6 +43,7 @@ void setShortcutHandler(Tomahawk::MacShortcutHandler* engine);
|
||||
// used for opening files with tomahawk
|
||||
void setApplicationHandler(PlatformInterface* handler);
|
||||
void checkForUpdates();
|
||||
void enableFullscreen();
|
||||
|
||||
};
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "macdelegate.h"
|
||||
#include "macshortcuthandler.h"
|
||||
#include "tomahawkapp.h"
|
||||
#include "config.h"
|
||||
|
||||
#import <AppKit/NSApplication.h>
|
||||
@ -232,3 +233,12 @@ void Tomahawk::checkForUpdates() {
|
||||
[[SUUpdater sharedUpdater] checkForUpdates: NSApp];
|
||||
#endif
|
||||
}
|
||||
|
||||
void Tomahawk::enableFullscreen()
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||
NSView *nsview = (NSView *)APP->mainWindow()->winId();
|
||||
NSWindow *nswindow = [nsview window];
|
||||
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
#endif
|
||||
}
|
||||
|
@ -267,6 +267,11 @@ TomahawkApp::init()
|
||||
// check if our spotify playlist api server is up and running, and enable spotify playlist drops if so
|
||||
QNetworkReply* r = TomahawkUtils::nam()->get( QNetworkRequest( QUrl( SPOTIFY_PLAYLIST_API_URL "/playlist/test" ) ) );
|
||||
connect( r, SIGNAL( finished() ), this, SLOT( spotifyApiCheckFinished() ) );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
// Make sure to do this after main window is inited
|
||||
Tomahawk::enableFullscreen();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user