1049 if not ext: |
1049 if not ext: |
1050 ex = selectedFilter.split("(*")[1].split(")")[0] |
1050 ex = selectedFilter.split("(*")[1].split(")")[0] |
1051 if ex: |
1051 if ex: |
1052 fileName += ex |
1052 fileName += ex |
1053 if QFileInfo(fileName).exists(): |
1053 if QFileInfo(fileName).exists(): |
1054 res = E5MessageBox.yesNo(self, |
1054 res = E5MessageBox.yesNo( |
|
1055 self, |
1055 self.trUtf8("Save icon file"), |
1056 self.trUtf8("Save icon file"), |
1056 self.trUtf8("<p>The file <b>{0}</b> already exists." |
1057 self.trUtf8("<p>The file <b>{0}</b> already exists." |
1057 " Overwrite it?</p>").format(fileName), |
1058 " Overwrite it?</p>").format(fileName), |
1058 icon=E5MessageBox.Warning) |
1059 icon=E5MessageBox.Warning) |
1059 if not res: |
1060 if not res: |
1171 Private method to ask the user to save the file, if it was modified. |
1172 Private method to ask the user to save the file, if it was modified. |
1172 |
1173 |
1173 @return flag indicating, if it is ok to continue (boolean) |
1174 @return flag indicating, if it is ok to continue (boolean) |
1174 """ |
1175 """ |
1175 if self.__editor.isDirty(): |
1176 if self.__editor.isDirty(): |
1176 ret = E5MessageBox.okToClearData(self, |
1177 ret = E5MessageBox.okToClearData( |
|
1178 self, |
1177 self.trUtf8("eric5 Icon Editor"), |
1179 self.trUtf8("eric5 Icon Editor"), |
1178 self.trUtf8("""The icon image has unsaved changes."""), |
1180 self.trUtf8("""The icon image has unsaved changes."""), |
1179 self.__saveIcon) |
1181 self.__saveIcon) |
1180 if not ret: |
1182 if not ret: |
1181 return False |
1183 return False |