When a new plugin is added to calibre, add its icon (if any) to the second toolbar instead of the main one, by default (the user can change this during the plugin add process and afterwards)

This commit is contained in:
Kovid Goyal 2012-03-25 18:21:16 +05:30
parent 785c357da2
commit 63c0f96795

View File

@ -39,6 +39,9 @@ class ChoosePluginToolbarsDialog(QDialog):
self._locations_list.setSizePolicy(sizePolicy) self._locations_list.setSizePolicy(sizePolicy)
for key, text in locations: for key, text in locations:
self._locations_list.addItem(text) self._locations_list.addItem(text)
if key in {'toolbar-child',}:
self._locations_list.item(self._locations_list.count()-1
).setSelected(True)
self._layout.addWidget(self._locations_list) self._layout.addWidget(self._locations_list)
self._footer_label = QLabel( self._footer_label = QLabel(