[Pkg-owncloud-commits] [owncloud-client] 167/498: shell_i: Don't load the old extension in >= 10.10 #2340
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 977b1464b5645a49867234450530bd81becae590
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date: Tue Jun 16 15:29:43 2015 +0200
shell_i: Don't load the old extension in >= 10.10 #2340
---
src/gui/owncloudgui.cpp | 50 ++++++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 23 deletions(-)
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index 087d829..17a8994 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -107,29 +107,33 @@ ownCloudGui::ownCloudGui(Application *parent) :
void ownCloudGui::setupOverlayIcons()
{
#ifdef Q_OS_MAC
- const QLatin1String finderExtension("/Library/ScriptingAdditions/SyncStateFinder.osax");
- if(QFile::exists(finderExtension) ) {
- QString aScript = QString::fromUtf8("tell application \"Finder\"\n"
- " try\n"
- " «event OWNCload»\n"
- " end try\n"
- "end tell\n");
-
- QString osascript = "/usr/bin/osascript";
- QStringList processArguments;
- // processArguments << "-l" << "AppleScript";
-
- QProcess p;
- p.start(osascript, processArguments);
- p.write(aScript.toUtf8());
- p.closeWriteChannel();
- p.waitForReadyRead(-1);
- QByteArray result = p.readAll();
- QString resultAsString(result); // if appropriate
- qDebug() << "Laod Finder Overlay-Plugin: " << resultAsString << ": " << p.exitCode()
- << (p.exitCode() != 0 ? p.errorString() : QString::null);
- } else {
- qDebug() << finderExtension << "does not exist! Finder Overlay Plugin loading failed";
+ // Make sure that we only send the load event to the legacy plugin when
+ // using OS X <= 10.9 since 10.10 starts using the new FinderSync one.
+ if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_10) {
+ const QLatin1String finderExtension("/Library/ScriptingAdditions/SyncStateFinder.osax");
+ if (QFile::exists(finderExtension)) {
+ QString aScript = QString::fromUtf8("tell application \"Finder\"\n"
+ " try\n"
+ " «event OWNCload»\n"
+ " end try\n"
+ "end tell\n");
+
+ QString osascript = "/usr/bin/osascript";
+ QStringList processArguments;
+ // processArguments << "-l" << "AppleScript";
+
+ QProcess p;
+ p.start(osascript, processArguments);
+ p.write(aScript.toUtf8());
+ p.closeWriteChannel();
+ p.waitForReadyRead(-1);
+ QByteArray result = p.readAll();
+ QString resultAsString(result); // if appropriate
+ qDebug() << "Laod Finder Overlay-Plugin: " << resultAsString << ": " << p.exitCode()
+ << (p.exitCode() != 0 ? p.errorString() : QString::null);
+ } else {
+ qDebug() << finderExtension << "does not exist! Finder Overlay Plugin loading failed";
+ }
}
#endif
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list