łň ĄőEc@s dZdefd„ƒYZdS(s This modules exposes a class responsible for creating the text editor's print dialog. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright Š 2005 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com t PrintDialogcBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s< This class creates the print dialog for the text editor. cCs@|i|ƒ|iƒ|iid|iƒ|_|iƒdS(sÝ Initialize the print dialog. @param self: Reference to the ScribesPrintDialog instance. @type self: A ScribesPrintDialog object. @param editor: Reference to the text editor. @type editor: An Editor object. tresponseN(t_PrintDialog__init_attributest_PrintDialog__set_propertiest_PrintDialog__dialogtconnectt%_PrintDialog__printdialog_response_cbt_PrintDialog__signal_id_1t_PrintDialog__show_dialog(tselfteditor((splugins/PrintDialog/Dialog.pyt__init__$s  cCs—||_d|_ddkl}||ƒ|_|iiƒ|_ddkl }l }ddk l }||i||ƒ|_ d|_d|_dS(sä Initialize the Dialog's attributes. @param self: Reference to the ScribesPrintDialog instance. @type self: A ScribesPrintDialog object. @param editor: Reference to the text editor. @type editor: An Editor object. i˙˙˙˙(tPrintJob(tDialogt DIALOG_RANGE(tmsg0001N(t_PrintDialog__editortNonet_PrintDialog__status_idtJobR t_PrintDialog__printjobtget_jobt_PrintDialog__jobt gnomeprint.uiR Rti18nRRRt_PrintDialog__preview(R R R R RR((splugins/PrintDialog/Dialog.pyt__init_attributes3s    cCskddkl}||iiddƒ\}}|ii||ƒ|iidƒ|ii|iiƒdS(s‹ Set the dialog's properties. @param self: Reference to the ScribesPrintDialog instance. @type self: A ScribesPrintDialog object. i˙˙˙˙(t!calculate_resolution_independencegš™™™™™ů?g~ŐÖßţ?t stock_printN(t SCRIBES.utilsRRtwindowRtset_default_sizet set_icon_nametset_transient_for(R Rtwidththeight((splugins/PrintDialog/Dialog.pyt__set_propertiesIs cCsRddkl}|iii|dƒ|_|iid|iƒ|iiƒdS(s… Show the print dialog. @param self: Reference to the ScribesPrintDialog instance. @type self: A ScribesPrintDialog object. i˙˙˙˙(tmsg0002tprints show-dialogN( RR%Rtfeedbacktset_modal_messageRtemitRtrun(R R%((splugins/PrintDialog/Dialog.pyt __show_dialogXs  cCs÷ddkl}l}||jo,ddkl}||i|iƒ|_nĽ||joT|ii i |i ƒ|ii ƒ|ii d|iƒ|iiƒ|iƒnD|ii i |i ƒ|ii d|iƒ|iiƒ|iƒdS(sŚ Handles callback when the "response" signal is emitted. @param self: Reference to the ScribesPrintDialog instance. @type self: A ScribesPrintDialog object. i˙˙˙˙(tDIALOG_RESPONSE_PRINTtDIALOG_RESPONSE_PREVIEW(t PrintPreviews hide-dialogN(RR,R-tPreviewR.RRRRR'tunset_modal_messageRtprint_R)thidet_PrintDialog__destroy(R tdialogRR,R-R.((splugins/PrintDialog/Dialog.pyt__printdialog_response_cbes      cCs‚ddkl}l}||i|iƒ|iiƒ|iiƒ|io|iiƒn||iƒ||ƒ~d}dS(s€ Destroy instance of this class. @param self: Reference to the PrintDialog instance. @type self: A PrintDialog object. i˙˙˙˙(tdisconnect_signaltdelete_attributesN( RR6R7RRtdestroyRRR(R R6R7((splugins/PrintDialog/Dialog.pyt __destroy}s     ( t__name__t __module__t__doc__R RRRRR3(((splugins/PrintDialog/Dialog.pyRs    N(R<tobjectR(((splugins/PrintDialog/Dialog.pyss