From b6b58268c6c5efa55299fc8ee860df59bc19e25a Mon Sep 17 00:00:00 2001 From: dmc Date: Tue, 7 Jan 2025 17:33:25 +0100 Subject: [PATCH] Pear.electron.getPathForFile -> Pear.media.getPathForFile --- gui/preload.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gui/preload.js b/gui/preload.js index f1241a6b6..db9e16a0d 100644 --- a/gui/preload.js +++ b/gui/preload.js @@ -42,18 +42,14 @@ module.exports = class PearGUI extends ReadyResource { camera: () => ipc.askForMediaAccess({ id, media: 'camera' }), screen: () => ipc.askForMediaAccess({ id, media: 'screen' }) }, - desktopSources: (options = {}) => ipc.desktopSources(options) + desktopSources: (options = {}) => ipc.desktopSources(options), + getPathForFile: (file) => electron.webUtils.getPathForFile(file) } this.badge = (count) => { if (!Number.isInteger(+count)) throw new Error('argument must be an integer') return ipc.badge(count) } - this.electron = {} - this.electron.getPathForFile = (file) => { - return electron.webUtils.getPathForFile(file) - } - const kGuiCtrl = Symbol('gui:ctrl') class Parent extends EventEmitter {