Ejemplo n.º 1
0
 def open_print_dialog(self, *data):
     if (self.has_selection()):
         text = self.get_selected_text()
     else:
         text = self.get_text()
     print_dialog.print_with_action(
         text, print_dialog.print_with_action.PRINT_DIALOG)
Ejemplo n.º 2
0
 def print_preview(self, *data):
     if (self.has_selection()):
         text = self.get_selected_text()
     else:
         text = self.get_text()
     print_dialog.print_with_action(text,
                                    print_dialog.print_with_action.PREVIEW)
Ejemplo n.º 3
0
	def print_to_pdf(self,*data):
		save_file = file_chooser.FileChooserDialog(_("Enter the file name"),
			file_chooser.FileChooserDialog.SAVE,macros.supported_pdf_formats,macros.user_home_path)
		response = save_file.run()
		if response == file_chooser.FileChooserDialog.ACCEPT:
			if (self.has_selection()):
				text = self.get_selected_text()
			else:
				text = self.get_text()
			print_dialog.print_with_action(text,print_dialog.print_with_action.EXPORT,
				save_file.get_filename())
			save_file.destroy()
Ejemplo n.º 4
0
	def print_to_pdf(self,*data):
		save_file = file_chooser.FileChooserDialog(_("Enter the file name"),
			file_chooser.FileChooserDialog.SAVE,macros.supported_pdf_formats,macros.home_dir)
		response = save_file.run()
		if response == file_chooser.FileChooserDialog.ACCEPT:
			if (self.has_selection()):
				text = self.get_selected_text()
			else:
				text = self.get_text()
			print_dialog.print_with_action(text,print_dialog.print_with_action.EXPORT,
				save_file.get_filename())
			save_file.destroy()
Ejemplo n.º 5
0
	def open_print_dialog(self,*data):
		if (self.has_selection()):
			text = self.get_selected_text()
		else:
			text = self.get_text()
		print_dialog.print_with_action(text,print_dialog.print_with_action.PRINT_DIALOG)		
Ejemplo n.º 6
0
	def print_preview(self,*data):
		if (self.has_selection()):
			text = self.get_selected_text()
		else:
			text = self.get_text()
		print_dialog.print_with_action(text,print_dialog.print_with_action.PREVIEW)