From f38feb05a8a3440ed35fc30bfe31aee16e925726 Mon Sep 17 00:00:00 2001 From: Et0h Date: Tue, 18 Oct 2016 00:10:45 +0100 Subject: [PATCH] Add "add X as trusted domain" room menu option --- syncplay/ui/gui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 02a082b..2325d42 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -555,6 +555,9 @@ class MainWindow(QtGui.QMainWindow): pathFound = self._syncplayClient.fileSwitch.findFilepath(filename) if pathFound: menu.addAction(QtGui.QPixmap(resourcespath + u"film_go.png"), getMessage("openusersfile-menu-label").format(shortUsername), lambda: self.openFile(pathFound)) + if self._syncplayClient.isUntrustedTrustableURI(filename): + domain = utils.getDomainFromURL(filename) + menu.addAction(QtGui.QPixmap(resourcespath + u"shield_add.png"),getMessage("addtrusteddomain-menu-label").format(domain), lambda: self.addTrustedDomain(domain)) else: return menu.exec_(self.listTreeView.viewport().mapToGlobal(position))