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)
|
domain = utils.getDomainFromURL(filename)
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + u"shield_add.png"),getMessage("addtrusteddomain-menu-label").format(domain), lambda: self.addTrustedDomain(domain))
|
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)
|
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:
|
else:
|
||||||
return
|
return
|
||||||
menu.exec_(self.listTreeView.viewport().mapToGlobal(position))
|
menu.exec_(self.listTreeView.viewport().mapToGlobal(position))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user