mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-14 19:04:57 +00:00
Don't show 'open containing folder' option if no folder was found
This commit is contained in:
parent
52067c497f
commit
0ed660e9ec
@ -578,9 +578,10 @@ class MainWindow(QtGui.QMainWindow):
|
||||
domain = utils.getDomainFromURL(filename)
|
||||
menu.addAction(QtGui.QPixmap(resourcespath + u"shield_add.png"),getMessage("addtrusteddomain-menu-label").format(domain), lambda: self.addTrustedDomain(domain))
|
||||
|
||||
if not isURL(filename):
|
||||
if not isURL(filename) and filename <> getMessage("nofile-note"):
|
||||
path = self._syncplayClient.fileSwitch.findFilepath(filename)
|
||||
menu.addAction(QtGui.QPixmap(resourcespath + u"film_folder_edit.png"), getMessage('open-containing-folder'), lambda: utils.open_system_file_browser(path))
|
||||
if path:
|
||||
menu.addAction(QtGui.QPixmap(resourcespath + u"film_folder_edit.png"), getMessage('open-containing-folder'), lambda: utils.open_system_file_browser(path))
|
||||
else:
|
||||
return
|
||||
menu.exec_(self.listTreeView.viewport().mapToGlobal(position))
|
||||
|
Loading…
Reference in New Issue
Block a user