-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from sieren/0.5.5-rc2
RC2 Features and Fixes
- Loading branch information
Showing
16 changed files
with
388 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
./clean.sh | ||
~/Qt/5.5/clang_64/bin/qmake ../ | ||
~/Qt/5.7/clang_64/bin/qmake ../ | ||
make | ||
~/Qt/5.5/clang_64/bin/macdeployqt QSyncthingTray.app -dmg -verbose=2 | ||
~/Qt/5.7/clang_64/bin/macdeployqt QSyncthingTray.app -dmg -verbose=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/****************************************************************************** | ||
// QSyncthingTray | ||
// Copyright (c) Matthias Frick, All rights reserved. | ||
// | ||
// This library is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU Lesser General Public | ||
// License as published by the Free Software Foundation; either | ||
// version 3.0 of the License, or (at your option) any later version. | ||
// | ||
// This library is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public | ||
// License along with this library. | ||
******************************************************************************/ | ||
|
||
#include <platforms/darwin/macUtils.hpp> | ||
#include <Cocoa/Cocoa.h> | ||
|
||
namespace qst | ||
{ | ||
namespace platforms | ||
{ | ||
namespace darwin | ||
{ | ||
void MacUtils::showDockIcon(bool show) | ||
{ | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
ProcessSerialNumber psn; | ||
windowCounter += show ? 1 : -1; | ||
UInt32 transformState = show ? kProcessTransformToForegroundApplication : | ||
kProcessTransformToUIElementApplication; | ||
const bool shouldHideLastWindow = | ||
(transformState == kProcessTransformToUIElementApplication && | ||
windowCounter == 0) ? true : false; | ||
const bool shouldShowWindow = | ||
(transformState == kProcessTransformToForegroundApplication && | ||
windowCounter > 0) ? true : false; | ||
if (GetCurrentProcess(&psn) == noErr && (shouldShowWindow || shouldHideLastWindow)) | ||
{ | ||
TransformProcessType(&psn, | ||
transformState); | ||
dispatch_async(dispatch_get_main_queue(), ^{ | ||
[NSApp activateIgnoringOtherApps:YES]; | ||
}); | ||
} | ||
#pragma clang diagnostic pop | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.