576 """ |
576 """ |
577 fn, selectedFilter = EricFileDialog.getSaveFileNameAndFilter( |
577 fn, selectedFilter = EricFileDialog.getSaveFileNameAndFilter( |
578 self, |
578 self, |
579 self.tr("Export Templates"), |
579 self.tr("Export Templates"), |
580 "", |
580 "", |
581 self.tr("Templates Files (*.ecj);;" "All Files (*)"), |
581 self.tr("Templates Files (*.ecj);;All Files (*)"), |
582 "", |
582 "", |
583 EricFileDialog.DontConfirmOverwrite, |
583 EricFileDialog.DontConfirmOverwrite, |
584 ) |
584 ) |
585 |
585 |
586 if fn: |
586 if fn: |
765 else: |
765 else: |
766 if len(indent) > 0: |
766 if len(indent) > 0: |
767 count += len(indent) |
767 count += len(indent) |
768 |
768 |
769 if "i_n_s_e_r_t_i_o_n" in txt and "s_e_l_e_c_t" in txt: |
769 if "i_n_s_e_r_t_i_o_n" in txt and "s_e_l_e_c_t" in txt: |
770 txt = "'Insertion and selection can not be in" " template together'" |
770 txt = "'Insertion and selection can not be in template together'" |
771 |
771 |
772 if "i_n_s_e_r_t_i_o_n" in txt: |
772 if "i_n_s_e_r_t_i_o_n" in txt: |
773 lines = 1 |
773 lines = 1 |
774 for aline in txt.splitlines(): |
774 for aline in txt.splitlines(): |
775 count = aline.find("i_n_s_e_r_t_i_o_n") |
775 count = aline.find("i_n_s_e_r_t_i_o_n") |