diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-10-24 18:42:40 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-10-24 18:43:25 (GMT) |
commit | 22501a3af25840b90898c3b4c075581947646476 (patch) | |
tree | 43a366eb4f00f930fea235481eeff343a3b0c582 /SwifTools | |
parent | d4789216fc8894a5ce3ed359851422acecfe6bdb (diff) | |
download | swift-22501a3af25840b90898c3b4c075581947646476.zip swift-22501a3af25840b90898c3b4c075581947646476.tar.bz2 |
Don't register ourself as default URI handler.
We need to ask the user first.
Diffstat (limited to 'SwifTools')
-rw-r--r-- | SwifTools/URIHandler/MacOSXURIHandler.mm | 6 | ||||
-rw-r--r-- | SwifTools/URIHandler/MacOSXURIHandlerHelpers.h | 11 | ||||
-rw-r--r-- | SwifTools/URIHandler/MacOSXURIHandlerHelpers.mm | 16 | ||||
-rw-r--r-- | SwifTools/URIHandler/SConscript | 3 |
4 files changed, 5 insertions, 31 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 += [] |