E5Gui/E5ToolBarDialog.py

changeset 541
00e1a5d060c5
parent 538
7f1a56e80124
child 564
b3d966393ba9
equal deleted inserted replaced
540:2631831b4052 541:00e1a5d060c5
147 def on_removeButton_clicked(self): 147 def on_removeButton_clicked(self):
148 """ 148 """
149 Private slot to remove a custom toolbar 149 Private slot to remove a custom toolbar
150 """ 150 """
151 name = self.toolbarComboBox.currentText() 151 name = self.toolbarComboBox.currentText()
152 res = E5MessageBox.question(self, 152 res = E5MessageBox.yesNo(self,
153 self.trUtf8("Remove Toolbar"), 153 self.trUtf8("Remove Toolbar"),
154 self.trUtf8("""Should the toolbar <b>{0}</b> really be removed?""")\ 154 self.trUtf8("""Should the toolbar <b>{0}</b> really be removed?""")\
155 .format(name), 155 .format(name))
156 QMessageBox.StandardButtons(\ 156 if res:
157 QMessageBox.No | \
158 QMessageBox.Yes),
159 QMessageBox.No)
160 if res == QMessageBox.Yes:
161 index = self.toolbarComboBox.currentIndex() 157 index = self.toolbarComboBox.currentIndex()
162 tbItemID = self.toolbarComboBox.itemData(index) 158 tbItemID = self.toolbarComboBox.itemData(index)
163 tbItem = self.__toolbarItems[tbItemID] 159 tbItem = self.__toolbarItems[tbItemID]
164 if tbItem.toolBarId is not None and \ 160 if tbItem.toolBarId is not None and \
165 tbItem.toolBarId not in self.__removedToolBarIDs: 161 tbItem.toolBarId not in self.__removedToolBarIDs:

eric ide

mercurial