IconEditor/IconEditorWindow.py

changeset 549
fe99d46d56c8
parent 547
cceececd1312
child 553
5af61623ae3c
equal deleted inserted replaced
548:ac7af05dd54a 549:fe99d46d56c8
1114 Private method to ask the user to save the file, if it was modified. 1114 Private method to ask the user to save the file, if it was modified.
1115 1115
1116 @return flag indicating, if it is ok to continue (boolean) 1116 @return flag indicating, if it is ok to continue (boolean)
1117 """ 1117 """
1118 if self.__editor.isDirty(): 1118 if self.__editor.isDirty():
1119 ret = E5MessageBox.warning(self, 1119 ret = E5MessageBox.okToClearData(self,
1120 self.trUtf8("eric5 Icon Editor"), 1120 self.trUtf8("eric5 Icon Editor"),
1121 self.trUtf8("""The icon image has unsaved changes."""), 1121 self.trUtf8("""The icon image has unsaved changes."""),
1122 QMessageBox.StandardButtons(\ 1122 self.__saveIcon)
1123 QMessageBox.Abort | \ 1123 if not ret:
1124 QMessageBox.Discard | \
1125 QMessageBox.Save),
1126 QMessageBox.Save)
1127 if ret == QMessageBox.Save:
1128 return self.__saveIcon()
1129 elif ret == QMessageBox.Abort:
1130 return False 1124 return False
1131 return True 1125 return True
1132 1126
1133 def __checkActions(self): 1127 def __checkActions(self):
1134 """ 1128 """

eric ide

mercurial