From 8fd83795e8465a335dba3c83c93986d8665fbdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Wed, 5 Feb 2020 16:23:12 +0200 Subject: [PATCH] Remove MacWord plugin IPC pipe initialization Moved to MacWord plugin codebase: zotero/zotero-word-for-mac-integration#6adf8a7 --- chrome/content/zotero/xpcom/integration.js | 51 ---------------------- chrome/content/zotero/xpcom/zotero.js | 2 - 2 files changed, 53 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 306c93ce40..5fc823b6a0 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -69,57 +69,6 @@ Zotero.Integration = new function() { this.currentWindow = false; this.sessions = {}; - /** - * Initializes the pipe used for integration on non-Windows platforms. - */ - this.init = function() { - // We only use an integration pipe on OS X. - // On Linux, we use the alternative communication method in the OOo plug-in - // On Windows, we use a command line handler for integration. See - // components/zotero-integration-service.js for this implementation. - if(!Zotero.isMac) return; - - // Determine where to put the pipe - // on OS X, first try /Users/Shared for those who can't put pipes in their home - // directories - var pipe = null; - var sharedDir = Zotero.File.pathToFile('/Users/Shared'); - - if(sharedDir.exists() && sharedDir.isDirectory()) { - var logname = Components.classes["@mozilla.org/process/environment;1"]. - getService(Components.interfaces.nsIEnvironment). - get("LOGNAME"); - var sharedPipe = sharedDir.clone(); - sharedPipe.append(".zoteroIntegrationPipe_"+logname); - - if(sharedPipe.exists()) { - if(this.deletePipe(sharedPipe) && sharedDir.isWritable()) { - pipe = sharedPipe; - } - } else if(sharedDir.isWritable()) { - pipe = sharedPipe; - } - } - - if(!pipe) { - // on other platforms, or as a fallback, use home directory - pipe = Components.classes["@mozilla.org/file/directory_service;1"]. - getService(Components.interfaces.nsIProperties). - get("Home", Components.interfaces.nsIFile); - pipe.append(".zoteroIntegrationPipe"); - - // destroy old pipe, if one exists - if(!this.deletePipe(pipe)) return; - } - - // try to initialize pipe - try { - this.initPipe(pipe); - } catch(e) { - Zotero.logError(e); - } - } - /** * Begin listening for integration commands on the given pipe * @param {String} pipe The path to the pipe diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index a94f70dce0..3dc25709d6 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -682,8 +682,6 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); Zotero.locked = false; // Initialize various services - Zotero.Integration.init(); - if(Zotero.Prefs.get("httpServer.enabled")) { Zotero.Server.init(); }