Browse Source

Removed the native event for the user preferences changed as it's no longer needed

Shaddock Heath 9 years ago
parent
commit
797b7d78de

+ 1 - 7
Source/Atomic/Resource/ResourceEvents.h

@@ -74,7 +74,7 @@ EVENT(E_RESOURCEBACKGROUNDLOADED, ResourceBackgroundLoaded)
     PARAM(P_SUCCESS, Success);                      // bool
     PARAM(P_SUCCESS, Success);                      // bool
     PARAM(P_RESOURCE, Resource);                    // Resource pointer
     PARAM(P_RESOURCE, Resource);                    // Resource pointer
 }
 }
-    
+
 /// Resource was renamed
 /// Resource was renamed
 EVENT(E_RENAMERESOURCENOTIFICATION, RenameResourceNotification)
 EVENT(E_RENAMERESOURCENOTIFICATION, RenameResourceNotification)
 {
 {
@@ -95,12 +95,6 @@ EVENT(E_PROJECTUNLOADEDNOTIFICATION, ProjecUnloadedNotification)
 {
 {
 }
 }
     
     
-/// User Preferences Changed
-EVENT(E_USERPREFERENCESCHANGEDNOTIFICAITON, UserPreferencesChangedNotification)
-{
-}
-    
-
 /// Language changed.
 /// Language changed.
 EVENT(E_CHANGELANGUAGE, ChangeLanguage)
 EVENT(E_CHANGELANGUAGE, ChangeLanguage)
 {
 {

+ 0 - 12
Source/AtomicEditor/Editors/JSResourceEditor.cpp

@@ -90,7 +90,6 @@ JSResourceEditor ::JSResourceEditor(Context* context, const String &fullpath, UI
     SubscribeToEvent(E_RENAMERESOURCENOTIFICATION, HANDLER(JSResourceEditor, HandleRenameResourceNotification));
     SubscribeToEvent(E_RENAMERESOURCENOTIFICATION, HANDLER(JSResourceEditor, HandleRenameResourceNotification));
     SubscribeToEvent(E_DELETERESOURCENOTIFICATION, HANDLER(JSResourceEditor, HandleDeleteResourceNotification));
     SubscribeToEvent(E_DELETERESOURCENOTIFICATION, HANDLER(JSResourceEditor, HandleDeleteResourceNotification));
     SubscribeToEvent(E_PROJECTUNLOADEDNOTIFICATION, HANDLER(JSResourceEditor, HandleProjectUnloadedNotification));
     SubscribeToEvent(E_PROJECTUNLOADEDNOTIFICATION, HANDLER(JSResourceEditor, HandleProjectUnloadedNotification));
-    SubscribeToEvent(E_USERPREFERENCESCHANGEDNOTIFICAITON, HANDLER(JSResourceEditor, HandleUserPreferencesChangedNotification));
 
 
     c->AddChild(webView_->GetInternalWidget());
     c->AddChild(webView_->GetInternalWidget());
 
 
@@ -138,17 +137,6 @@ void JSResourceEditor::HandleProjectUnloadedNotification(StringHash eventType, V
     webClient_->ExecuteJavaScript("HOST_projectUnloaded();");
     webClient_->ExecuteJavaScript("HOST_projectUnloaded();");
 }
 }
 
 
-void JSResourceEditor::HandleUserPreferencesChangedNotification(StringHash eventType, VariantMap& eventData)
-{
-    ToolSystem* tsys = GetSubsystem<ToolSystem>();
-    Project* proj = tsys->GetProject();
-    FileSystem* fileSystem = GetSubsystem<FileSystem>();
-    if (fileSystem->FileExists(proj->GetUserPrefsFullPath()))
-    {
-        webClient_->ExecuteJavaScript(ToString("HOST_loadPreferences(\"atomic://%s\");", proj->GetUserPrefsFullPath().CString()));
-    }
-}
-    
 void JSResourceEditor::HandleWebViewLoadEnd(StringHash eventType, VariantMap& eventData)
 void JSResourceEditor::HandleWebViewLoadEnd(StringHash eventType, VariantMap& eventData)
 {
 {
     // need to wait until we get an editor load complete message since we could
     // need to wait until we get an editor load complete message since we could

+ 0 - 1
Source/AtomicEditor/Editors/JSResourceEditor.h

@@ -74,7 +74,6 @@ private:
     void HandleRenameResourceNotification(StringHash eventType, VariantMap& eventData);
     void HandleRenameResourceNotification(StringHash eventType, VariantMap& eventData);
     void HandleDeleteResourceNotification(StringHash eventType, VariantMap& eventData);
     void HandleDeleteResourceNotification(StringHash eventType, VariantMap& eventData);
     void HandleProjectUnloadedNotification(StringHash eventType, VariantMap& eventData);
     void HandleProjectUnloadedNotification(StringHash eventType, VariantMap& eventData);
-    void HandleUserPreferencesChangedNotification(StringHash eventType, VariantMap& eventData);
     
     
     SharedPtr<UIWebView> webView_;
     SharedPtr<UIWebView> webView_;
     WeakPtr<WebClient> webClient_;
     WeakPtr<WebClient> webClient_;