Address various zas comments

This commit is contained in:
Sophist
2014-03-24 15:30:48 +00:00
parent 3b4b71d1ca
commit 4347cc2cba
3 changed files with 13 additions and 13 deletions

View File

@@ -339,7 +339,7 @@ class Tagger(QtGui.QApplication):
except StopIteration:
return None
else:
if len(files) > 0:
if files > 0:
self.window.set_statusbar_message(N_("Adding %d files from '%s' ..."), len(files), root)
return (os.path.join(root, f) for f in files)

View File

@@ -248,7 +248,7 @@ class BaseTreeView(QtGui.QTreeWidget):
menu.addAction(self.window.view_info_action)
plugin_actions = list(_track_actions)
if obj.num_linked_files == 1:
menu.addAction(self.window.open_file_action)
menu.addAction(self.window.play_file_action)
menu.addAction(self.window.open_folder_action)
plugin_actions.extend(_file_actions)
menu.addAction(self.window.browser_lookup_action)
@@ -270,7 +270,7 @@ class BaseTreeView(QtGui.QTreeWidget):
elif isinstance(obj, File):
if can_view_info:
menu.addAction(self.window.view_info_action)
menu.addAction(self.window.open_file_action)
menu.addAction(self.window.play_file_action)
menu.addAction(self.window.open_folder_action)
menu.addAction(self.window.browser_lookup_action)
menu.addSeparator()
@@ -362,7 +362,7 @@ class BaseTreeView(QtGui.QTreeWidget):
menu.addMenu(CollectionMenu(selected_albums, _("Collections"), menu))
if plugin_actions:
plugin_menu = QtGui.QMenu(_("&Plugins"), menu)
plugin_menu = QtGui.QMenu(_("P&lugins"), menu)
plugin_menu.setIcon(self.panel.icon_plugins)
menu.addSeparator()
menu.addMenu(plugin_menu)

View File

@@ -307,7 +307,7 @@ class MainWindow(QtGui.QMainWindow):
self.add_files_action.triggered.connect(self.add_files)
self.add_directory_action = QtGui.QAction(icontheme.lookup('folder'), _(u"A&dd Folder..."), self)
self.add_directory_action.setStatusTip(_(u"Add folders to the tagger"))
self.add_directory_action.setStatusTip(_(u"Add a folder to the tagger"))
# TR: Keyboard shortcut for "Add Directory..."
self.add_directory_action.setShortcut(QtGui.QKeySequence(_(u"Ctrl+D")))
self.add_directory_action.triggered.connect(self.add_directory)
@@ -411,25 +411,25 @@ class MainWindow(QtGui.QMainWindow):
self.tags_from_filenames_action = QtGui.QAction(_(u"Tags From &File Names..."), self)
self.tags_from_filenames_action.triggered.connect(self.open_tags_from_filenames)
self.open_collection_in_browser_action = QtGui.QAction(_(u"&Open Collection in Browser"), self)
self.open_collection_in_browser_action = QtGui.QAction(_(u"&Open My Collections in Browser"), self)
self.open_collection_in_browser_action.triggered.connect(self.open_collection_in_browser)
self.open_collection_in_browser_action.setEnabled(config.setting["username"] != u'')
self.view_log_action = QtGui.QAction(_(u"View Error/Debug &Log..."), self)
self.view_log_action = QtGui.QAction(_(u"View Error/Debug &Log"), self)
self.view_log_action.triggered.connect(self.show_log)
self.view_history_action = QtGui.QAction(_(u"View Activity &History..."), self)
self.view_history_action = QtGui.QAction(_(u"View Activity &History"), self)
self.view_history_action.triggered.connect(self.show_history)
xmlws_manager = self.tagger.xmlws.manager
xmlws_manager.authenticationRequired.connect(self.show_password_dialog)
xmlws_manager.proxyAuthenticationRequired.connect(self.show_proxy_dialog)
self.open_file_action = QtGui.QAction(_(u"&Open..."), self)
self.open_file_action.setStatusTip(_(u"Open the file in your default media player"))
self.open_file_action.triggered.connect(self.open_file)
self.play_file_action = QtGui.QAction(_(u"&Play file"), self)
self.play_file_action.setStatusTip(_(u"Play the file in your default media player"))
self.play_file_action.triggered.connect(self.play_file)
self.open_folder_action = QtGui.QAction(_(u"Open &Folder..."), self)
self.open_folder_action = QtGui.QAction(_(u"Open Containing &Folder"), self)
self.open_folder_action.setStatusTip(_(u"Open the containing folder in your file explorer"))
self.open_folder_action.triggered.connect(self.open_folder)
@@ -703,7 +703,7 @@ class MainWindow(QtGui.QMainWindow):
return
return self.tagger.analyze(self.selected_objects)
def open_file(self):
def play_file(self):
files = self.tagger.get_files_from_objects(self.selected_objects)
for file in files:
url = QtCore.QUrl.fromLocalFile(file.filename)