summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-10-24 18:42:40 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-10-24 18:43:25 (GMT)
commit22501a3af25840b90898c3b4c075581947646476 (patch)
tree43a366eb4f00f930fea235481eeff343a3b0c582
parentd4789216fc8894a5ce3ed359851422acecfe6bdb (diff)
downloadswift-22501a3af25840b90898c3b4c075581947646476.zip
swift-22501a3af25840b90898c3b4c075581947646476.tar.bz2
Don't register ourself as default URI handler.
We need to ask the user first.
-rw-r--r--SwifTools/URIHandler/MacOSXURIHandler.mm6
-rw-r--r--SwifTools/URIHandler/MacOSXURIHandlerHelpers.h11
-rw-r--r--SwifTools/URIHandler/MacOSXURIHandlerHelpers.mm16
-rw-r--r--SwifTools/URIHandler/SConscript3
-rw-r--r--Swift/QtUI/QtURIHandler.cpp6
5 files changed, 5 insertions, 37 deletions
diff --git a/SwifTools/URIHandler/MacOSXURIHandler.mm b/SwifTools/URIHandler/MacOSXURIHandler.mm
index 3542e2f..0575d47 100644
--- a/SwifTools/URIHandler/MacOSXURIHandler.mm
+++ b/SwifTools/URIHandler/MacOSXURIHandler.mm
@@ -50,8 +50,10 @@ MacOSXURIHandler::~MacOSXURIHandler() {
void MacOSXURIHandler::start() {
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:p->eventHandler andSelector:@selector(getUrl:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL];
- NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier];
- LSSetDefaultHandlerForURLScheme((CFStringRef)@"xmpp", (CFStringRef)bundleID);
+
+ // Register ourselves as default URI handler
+ //NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier];
+ //LSSetDefaultHandlerForURLScheme((CFStringRef)@"xmpp", (CFStringRef)bundleID);
}
void MacOSXURIHandler::stop() {
diff --git a/SwifTools/URIHandler/MacOSXURIHandlerHelpers.h b/SwifTools/URIHandler/MacOSXURIHandlerHelpers.h
deleted file mode 100644
index 5a2db7a..0000000
--- a/SwifTools/URIHandler/MacOSXURIHandlerHelpers.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Copyright (c) 2011 Remko Tronçon
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#pragma once
-
-namespace Swift {
- void registerAppAsDefaultXMPPURIHandler();
-}
diff --git a/SwifTools/URIHandler/MacOSXURIHandlerHelpers.mm b/SwifTools/URIHandler/MacOSXURIHandlerHelpers.mm
deleted file mode 100644
index dca91b8..0000000
--- a/SwifTools/URIHandler/MacOSXURIHandlerHelpers.mm
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (c) 2011 Remko Tronçon
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#include <SwifTools/URIHandler/MacOSXURIHandlerHelpers.h>
-
-#include <Cocoa/Cocoa.h>
-
-namespace Swift {
- void registerAppAsDefaultXMPPURIHandler() {
- NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier];
- LSSetDefaultHandlerForURLScheme((CFStringRef)@"xmpp", (CFStringRef)bundleID);
- }
-}
diff --git a/SwifTools/URIHandler/SConscript b/SwifTools/URIHandler/SConscript
index 42c6ca8..90ec00a 100644
--- a/SwifTools/URIHandler/SConscript
+++ b/SwifTools/URIHandler/SConscript
@@ -7,8 +7,7 @@ sources = [
if swiftools_env["PLATFORM"] == "darwin" and swiftools_env["target"] == "native" :
sources += [
- "MacOSXURIHandler.mm",
- "MacOSXURIHandlerHelpers.mm",
+ "MacOSXURIHandler.mm"
]
elif swiftools_env["PLATFORM"] == "win32" :
sources += []
diff --git a/Swift/QtUI/QtURIHandler.cpp b/Swift/QtUI/QtURIHandler.cpp
index 43f3ed1..197f001 100644
--- a/Swift/QtUI/QtURIHandler.cpp
+++ b/Swift/QtUI/QtURIHandler.cpp
@@ -11,17 +11,11 @@
#include <QUrl>
#include "QtSwiftUtil.h"
-#ifdef Q_WS_MAC
-#include <SwifTools/URIHandler/MacOSXURIHandlerHelpers.h>
-#endif
using namespace Swift;
QtURIHandler::QtURIHandler() {
qApp->installEventFilter(this);
-#ifdef Q_WS_MAC
- registerAppAsDefaultXMPPURIHandler();
-#endif
}
bool QtURIHandler::eventFilter(QObject*, QEvent* event) {