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 """ |