E5Gui/E5ToolBarDialog.py

changeset 537
72b32daeb8d6
parent 535
4b00d7336e19
child 538
7f1a56e80124
equal deleted inserted replaced
536:6d8d39753c82 537:72b32daeb8d6
7 Module implementing a toolbar configuration dialog. 7 Module implementing a toolbar configuration dialog.
8 """ 8 """
9 9
10 from PyQt4.QtGui import * 10 from PyQt4.QtGui import *
11 from PyQt4.QtCore import * 11 from PyQt4.QtCore import *
12
13 from E5Gui import E5MessageBox
12 14
13 from .Ui_E5ToolBarDialog import Ui_E5ToolBarDialog 15 from .Ui_E5ToolBarDialog import Ui_E5ToolBarDialog
14 16
15 import UI.PixmapCache 17 import UI.PixmapCache
16 18
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()

eric ide

mercurial