127 if self.toolbarComboBox.findText(name) != -1: |
127 if self.toolbarComboBox.findText(name) != -1: |
128 # toolbar with this name already exists |
128 # toolbar with this name already exists |
129 QMessageBox.critical(self, |
129 QMessageBox.critical(self, |
130 self.trUtf8("New Toolbar"), |
130 self.trUtf8("New Toolbar"), |
131 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
131 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
132 .format(name), |
132 .format(name)) |
133 QMessageBox.StandardButtons(\ |
|
134 QMessageBox.Abort)) |
|
135 return |
133 return |
136 |
134 |
137 tbItem = E5ToolBarItem(None, [], False) |
135 tbItem = E5ToolBarItem(None, [], False) |
138 tbItem.title = name |
136 tbItem.title = name |
139 tbItem.isChanged = True |
137 tbItem.isChanged = True |
188 if self.toolbarComboBox.findText(newName) != -1: |
186 if self.toolbarComboBox.findText(newName) != -1: |
189 # toolbar with this name already exists |
187 # toolbar with this name already exists |
190 QMessageBox.critical(self, |
188 QMessageBox.critical(self, |
191 self.trUtf8("Rename Toolbar"), |
189 self.trUtf8("Rename Toolbar"), |
192 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
190 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
193 .format(newName), |
191 .format(newName)) |
194 QMessageBox.StandardButtons(\ |
|
195 QMessageBox.Abort)) |
|
196 return |
192 return |
197 index = self.toolbarComboBox.currentIndex() |
193 index = self.toolbarComboBox.currentIndex() |
198 self.toolbarComboBox.setItemText(index, newName) |
194 self.toolbarComboBox.setItemText(index, newName) |
199 tbItem = \ |
195 tbItem = \ |
200 self.__toolbarItems[self.toolbarComboBox.itemData(index)] |
196 self.__toolbarItems[self.toolbarComboBox.itemData(index)] |