mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-29 10:56:06 +00:00
Removed web specific actions from context menu
This commit is contained in:
parent
c35dfa2223
commit
08903f6195
|
@ -19,7 +19,6 @@ from deemix.utils.localpaths import getConfigFolder
|
||||||
server_lock = Lock()
|
server_lock = Lock()
|
||||||
|
|
||||||
class LoginWindow(QDialog):
|
class LoginWindow(QDialog):
|
||||||
|
|
||||||
class CustomPage(QWebEnginePage):
|
class CustomPage(QWebEnginePage):
|
||||||
def acceptNavigationRequest(self, url, type, main):
|
def acceptNavigationRequest(self, url, type, main):
|
||||||
if url.toString() == "https://www.deezer.com/":
|
if url.toString() == "https://www.deezer.com/":
|
||||||
|
@ -32,9 +31,7 @@ class LoginWindow(QDialog):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.webview = QWebEngineView()
|
self.webview = QWebEngineView()
|
||||||
profile = QWebEngineProfile(self.webview)
|
profile = QWebEngineProfile(self.webview)
|
||||||
profile.clearHttpCache()
|
|
||||||
profile.setPersistentCookiesPolicy(QWebEngineProfile.NoPersistentCookies)
|
profile.setPersistentCookiesPolicy(QWebEngineProfile.NoPersistentCookies)
|
||||||
profile.setHttpCacheType(QWebEngineProfile.NoCache)
|
|
||||||
self.page = self.CustomPage(profile, self.webview)
|
self.page = self.CustomPage(profile, self.webview)
|
||||||
self.page.loadFinished.connect(self.checkURL)
|
self.page.loadFinished.connect(self.checkURL)
|
||||||
self.webview.setPage(self.page)
|
self.webview.setPage(self.page)
|
||||||
|
@ -61,6 +58,11 @@ class MainWindow(QMainWindow):
|
||||||
appLogin_trigger = pyqtSignal()
|
appLogin_trigger = pyqtSignal()
|
||||||
|
|
||||||
class MainWebpage(QWebEnginePage):
|
class MainWebpage(QWebEnginePage):
|
||||||
|
def __init__(self, parent):
|
||||||
|
super().__init__(parent)
|
||||||
|
actions = [0,1,2,3,10,11,12,13,14,31,16,19,25,26,28,30,32]
|
||||||
|
for a in actions:
|
||||||
|
self.action(a).setVisible(False)
|
||||||
|
|
||||||
class ExternalWebpage(QWebEnginePage):
|
class ExternalWebpage(QWebEnginePage):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
|
|
Loading…
Reference in a new issue