Preferences/ToolGroupConfigurationDialog.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3038
7fe9a53280bd
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
67 if len(self.groupsList.findItems( 67 if len(self.groupsList.findItems(
68 groupName, Qt.MatchFlags(Qt.MatchExactly))): 68 groupName, Qt.MatchFlags(Qt.MatchExactly))):
69 E5MessageBox.critical( 69 E5MessageBox.critical(
70 self, 70 self,
71 self.trUtf8("Add tool group entry"), 71 self.trUtf8("Add tool group entry"),
72 self.trUtf8("An entry for the group name {0} already exists.")\ 72 self.trUtf8("An entry for the group name {0} already exists.")
73 .format(groupName)) 73 .format(groupName))
74 return 74 return
75 75
76 self.groupsList.addItem(groupName) 76 self.groupsList.addItem(groupName)
77 self.toolGroups.append([groupName, []]) 77 self.toolGroups.append([groupName, []])
78 78
97 if len(self.groupsList.findItems( 97 if len(self.groupsList.findItems(
98 groupName, Qt.MatchFlags(Qt.MatchExactly))): 98 groupName, Qt.MatchFlags(Qt.MatchExactly))):
99 E5MessageBox.critical( 99 E5MessageBox.critical(
100 self, 100 self,
101 self.trUtf8("Add tool group entry"), 101 self.trUtf8("Add tool group entry"),
102 self.trUtf8("An entry for the group name {0} already exists.")\ 102 self.trUtf8("An entry for the group name {0} already exists.")
103 .format(groupName)) 103 .format(groupName))
104 return 104 return
105 105
106 self.toolGroups[row][0] = groupName 106 self.toolGroups[row][0] = groupName
107 self.groupsList.currentItem().setText(groupName) 107 self.groupsList.currentItem().setText(groupName)
108 108
117 117
118 res = E5MessageBox.yesNo( 118 res = E5MessageBox.yesNo(
119 self, 119 self,
120 self.trUtf8("Delete tool group entry"), 120 self.trUtf8("Delete tool group entry"),
121 self.trUtf8("""<p>Do you really want to delete the tool group""" 121 self.trUtf8("""<p>Do you really want to delete the tool group"""
122 """ <b>"{0}"</b>?</p>""")\ 122 """ <b>"{0}"</b>?</p>""")
123 .format(self.groupsList.currentItem().text()), 123 .format(self.groupsList.currentItem().text()),
124 icon=E5MessageBox.Warning) 124 icon=E5MessageBox.Warning)
125 if not res: 125 if not res:
126 return 126 return
127 127
128 if row == self.currentGroup: 128 if row == self.currentGroup:

eric ide

mercurial