mirror of
https://github.com/fergalmoran/picard.git
synced 2026-04-25 22:01:24 +00:00
disabling the cd lookup when no cd device is specified
This commit is contained in:
@@ -372,6 +372,9 @@ class MainWindow(QtGui.QMainWindow):
|
||||
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)
|
||||
else:
|
||||
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
|
||||
|
||||
self.cd_lookup_action.setEnabled(len(get_cdrom_drives()) > 0)
|
||||
|
||||
|
||||
def create_toolbar(self):
|
||||
self.toolbar = toolbar = self.addToolBar(_(u"&Toolbar"))
|
||||
|
||||
@@ -38,4 +38,6 @@ else:
|
||||
def get_cdrom_drives():
|
||||
from picard.tagger import Tagger
|
||||
tagger = Tagger.instance()
|
||||
return [d.strip() for d in tagger.config.setting["cd_lookup_device"].split(",")]
|
||||
# Need to filter out empty strings, particularly if the device list is empty
|
||||
return filter(lambda string: (string != u''),
|
||||
[d.strip() for d in tagger.config.setting["cd_lookup_device"].split(",")])
|
||||
|
||||
Reference in New Issue
Block a user