eric6/Templates/TemplateViewer.py

branch
jsonfiles
changeset 8021
a8ba35ce81ad
parent 8018
641c7c312f26
child 8143
2c730d5fd177
equal deleted inserted replaced
8020:eddc8c3d3f9e 8021:a8ba35ce81ad
593 ext = QFileInfo(fn).suffix() 593 ext = QFileInfo(fn).suffix()
594 if not ext: 594 if not ext:
595 ex = selectedFilter.split("(*")[1].split(")")[0] 595 ex = selectedFilter.split("(*")[1].split(")")[0]
596 if ex: 596 if ex:
597 fn += ex 597 fn += ex
598 self.writeTemplates(fn) 598 if os.path.exists(fn):
599 ok = E5MessageBox.yesNo(
600 self,
601 self.tr("Export Templates"),
602 self.tr("""<p>The templates file <b>{0}</b> exists"""
603 """ already. Overwrite it?</p>""").format(fn))
604 else:
605 ok = True
606
607 if ok:
608 self.writeTemplates(fn)
599 609
600 def __reload(self): 610 def __reload(self):
601 """ 611 """
602 Private slot to reload the templates. 612 Private slot to reload the templates.
603 """ 613 """

eric ide

mercurial