124 self.trUtf8("Toolbar Name:"), |
126 self.trUtf8("Toolbar Name:"), |
125 QLineEdit.Normal) |
127 QLineEdit.Normal) |
126 if ok and name: |
128 if ok and name: |
127 if self.toolbarComboBox.findText(name) != -1: |
129 if self.toolbarComboBox.findText(name) != -1: |
128 # toolbar with this name already exists |
130 # toolbar with this name already exists |
129 QMessageBox.critical(self, |
131 E5MessageBox.critical(self, |
130 self.trUtf8("New Toolbar"), |
132 self.trUtf8("New Toolbar"), |
131 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
133 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
132 .format(name)) |
134 .format(name)) |
133 return |
135 return |
134 |
136 |
183 if ok and newName: |
185 if ok and newName: |
184 if oldName == newName: |
186 if oldName == newName: |
185 return |
187 return |
186 if self.toolbarComboBox.findText(newName) != -1: |
188 if self.toolbarComboBox.findText(newName) != -1: |
187 # toolbar with this name already exists |
189 # toolbar with this name already exists |
188 QMessageBox.critical(self, |
190 E5MessageBox.critical(self, |
189 self.trUtf8("Rename Toolbar"), |
191 self.trUtf8("Rename Toolbar"), |
190 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
192 self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ |
191 .format(newName)) |
193 .format(newName)) |
192 return |
194 return |
193 index = self.toolbarComboBox.currentIndex() |
195 index = self.toolbarComboBox.currentIndex() |