def save_as(self):
chooser = ShoebotFileChooserDialog(_('<STR_LIT>'), None, Gtk.FileChooserAction.SAVE,<EOL>(Gtk.STOCK_SAVE, Gtk.ResponseType.ACCEPT,<EOL>Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))<EOL>chooser.set_do_overwrite_confirmation(True)<EOL>chooser.set_transient_for(self)<EOL>saved = chooser.run() == Gtk.ResponseType.ACCEPT<EOL>if saved:<EOL><INDENT>old_filename = self.filename<EOL>self.source_buffer.filename = chooser.get_filename()<EOL>if not self.save():<EOL><INDENT>self.filename = old_filename<EOL><DEDENT><DEDENT>chooser.destroy()<EOL>return saved<EOL>
Return True if the buffer was saved