From 22501a3af25840b90898c3b4c075581947646476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 24 Oct 2011 20:42:40 +0200 Subject: Don't register ourself as default URI handler. We need to ask the user first. 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 - -#include - -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 #include "QtSwiftUtil.h" -#ifdef Q_WS_MAC -#include -#endif using namespace Swift; QtURIHandler::QtURIHandler() { qApp->installEventFilter(this); -#ifdef Q_WS_MAC - registerAppAsDefaultXMPPURIHandler(); -#endif } bool QtURIHandler::eventFilter(QObject*, QEvent* event) { -- cgit v0.10.2-6-g49f6