diff --git a/syncplay/client.py b/syncplay/client.py index 52da1ef7..d0aed9a3 100755 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -1332,10 +1332,10 @@ def __init__(self, ui, client): self._client = client self._roomUsersChanged = True - def isReadinessSupported(self): + def isReadinessSupported(self, requiresOtherUsers=True): if not utils.meetsMinVersion(self._client.serverVersion, constants.USER_READY_MIN_VERSION): return False - elif self.onlyUserInRoomWhoSupportsReadiness(): + elif self.onlyUserInRoomWhoSupportsReadiness() and requiresOtherUsers: return False else: return self._client.serverFeatures["readiness"] diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 75083670..4b4c9b38 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -820,16 +820,13 @@ def openRoomMenu(self, position): if path: menu.addAction(QtGui.QPixmap(resourcespath + "folder_film.png"), getMessage('open-containing-folder'), lambda: utils.open_system_file_browser(path)) - - if roomToJoin == self._syncplayClient.getRoom() and self._syncplayClient.userlist.currentUser.canControl() and self._syncplayClient.userlist.isReadinessSupported() and self._syncplayClient.serverFeatures["setOthersReadiness"]: + if roomToJoin == self._syncplayClient.getRoom() and self._syncplayClient.userlist.currentUser.canControl() and self._syncplayClient.userlist.isReadinessSupported(requiresOtherUsers=False) and self._syncplayClient.serverFeatures["setOthersReadiness"]: if self._syncplayClient.userlist.isReady(username): addSetUserAsReadyText = getMessage("setasnotready-menu-label").format(shortUsername) menu.addAction(QtGui.QPixmap(resourcespath + "cross.png"), addSetUserAsReadyText, lambda: self._syncplayClient.setOthersReadiness(username, False)) else: addSetUserAsNotReadyText = getMessage("setasnotready-menu-label").format(shortUsername) menu.addAction(QtGui.QPixmap(resourcespath + "tick.png"), addSetUserAsNotReadyText, lambda: self._syncplayClient.setOthersReadiness(username, True)) - else: - return menu.exec_(self.listTreeView.viewport().mapToGlobal(position)) def updateListGeometry(self):