logic: file associations for Mac and opening project files via Mac OS

* hide start screen when opening with project file
* added project icon file to bundle and file type association to plist
* listen for file open events from double click or drag and drop
* fixed crashes in window handling
This commit is contained in:
Eberhard Graether
2016-02-02 13:20:05 +01:00
parent 29a70b8f70
commit 3cbafa6456
18 changed files with 183 additions and 40 deletions
+9 -3
View File
@@ -46,6 +46,8 @@ std::shared_ptr<Application> Application::create(
ptr->m_ideCommunicationController = networkFactory->createIDECommunicationController(ptr->m_storageCache.get());
ptr->startMessagingAndScheduling();
return ptr;
}
@@ -59,9 +61,6 @@ void Application::loadSettings()
Application::Application()
{
TaskScheduler::getInstance()->startSchedulerLoopThreaded();
MessageQueue::getInstance()->setSendMessagesAsTasks(true);
MessageQueue::getInstance()->startMessageLoopThreaded();
}
Application::~Application()
@@ -161,6 +160,13 @@ void Application::handleMessage(MessageSaveProject* message)
saveProject(message->projectSettingsFilePath);
}
void Application::startMessagingAndScheduling()
{
TaskScheduler::getInstance()->startSchedulerLoopThreaded();
MessageQueue::getInstance()->setSendMessagesAsTasks(true);
MessageQueue::getInstance()->startMessageLoopThreaded();
}
void Application::updateRecentProjects(const FilePath& projectSettingsFilePath)
{
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
+2
View File
@@ -48,6 +48,8 @@ private:
virtual void handleMessage(MessageRefresh* message);
virtual void handleMessage(MessageSaveProject* message);
void startMessagingAndScheduling();
void updateRecentProjects(const FilePath& projectSettingsFilePath);
std::shared_ptr<Project> m_project;
+1
View File
@@ -223,6 +223,7 @@ add_files(
utility/messaging/type/MessageChangeFileView.h
utility/messaging/type/MessageClearErrorCount.h
utility/messaging/type/MessageDeactivateEdge.h
utility/messaging/type/MessageEnteredLicense.h
utility/messaging/type/MessageFind.h
utility/messaging/type/MessageFinishedParsing.h
utility/messaging/type/MessageFlushUpdates.h
@@ -0,0 +1,21 @@
#ifndef MESSAGE_ENTERED_LICENSE_H
#define MESSAGE_ENTERED_LICENSE_H
#include "utility/messaging/Message.h"
class MessageEnteredLicense
: public Message<MessageEnteredLicense>
{
public:
MessageEnteredLicense()
{
setSendAsTask(false);
}
static const std::string getStaticType()
{
return "MessageEnteredLicense";
}
};
#endif // MESSAGE_ENTERED_LICENSE_H