mς \νηIc@s7dklZlZdkZdkZdkZdkZdkZeii ei dƒZ eii e ƒZ e ddZ e iddƒZ e iddƒZ eidƒZeiie dƒoe dZn ed Zd „Zd „Zd „Zd „Zd„Zd„Zd„Zdeifd„ƒYZdS((smodelsdialogNis\s\0source_filests \testNotebookt PROGRAMFILESsirfanview\i_view32.exes\irfanview\i_view32.execCs!|tjo d}nd}|S(Ntyestno(tvaluetTrue(R((t+c:\photoboof\0source_files\prefsprinting.pytconvert_from_bool*s cCs!|djo t}nt}|S(NR(RRtFalse(R((Rtconvert_to_bool1s cCsqyEtidƒ}g}x%|D]}|d}|i|ƒqW|SWn%tj o}dt |ƒ}nXdS(Niis!Error collecting printer status. ( t win32printt EnumPrinterst printers_arrtinstalled_printerstptcaptiontappendt Exceptiontetstrtmessage(RRR RR R((Rt get_printers8s cCsŒdk}|iƒyMtiƒ}g}g}g}x$|iƒD]}|i |i ƒqAW|SWn%t j o}dt|ƒ}nXdS(Ns!Error collecting printer status. (t pythoncomt CoInitializetwmitWMItcR tonline_printerstready_printerst Win32_PrinterRRRRRRR(RRR RRRRR((Rtget_printers_wmiSs    cCs |i|ti|ƒfƒdS(N(t resultListRthwndtwin32guit GetWindowText(R R((RtwindowEnumerationHandlerwscCsRg}tit|ƒx5|D]-}||djo|d|dfSqqWdS(Nii(NN(t topWindowsR!t EnumWindowsR#twindowtstringtNone(R'R&R$((RtfindWindowHandle{scCs:tdƒd}|oyti|ƒWq6q6XndS(Ns Photoboof! i(R)thandleR!tSetForegroundWindow(R*((RtfocusPhotoboofs tGeneralcBsGtZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCsυ|iƒ|_|ii|_|iid}y tƒ}Wndg}nX|o)||ii_ dg||ii _ ny |dWnd|dRDRCtconfigureprimaryprinterbuttonRBRton_applycommand_command(R6RH((RRGΰscCs‘d|id}d}ti|||titiBƒ}|i ƒ|i ƒt i i td|idƒ}dtd|}ti|ƒdS(Ns1Irfanview will now open, ready to print a sample sΰ layout. Once it opens, click File --> Print and then follow these steps to configure it: 1) make sure your printer is selected from the pulldown list 2) confirm page orientation (portrait or landscape) 3) make sure the "center image" checkbox is checked 4) check either "Best fit to page (aspect ratio)" or "Stretch to page (no aspect ratio)" 5) print the page to save the settings Note that you should repeat these steps if you change to a different sized layout.sConfigure Printers/utils/samples/s.jpgs"s" (R6R5Rt window_titletwxt MessageDialogtOKtICON_INFORMATIONtdlgt ShowModaltDestroytostpathtabspathtcurrent_directorytfnamet irfanviewtcommandtprocesst ProcessOpen(R6RHRRR[RYRRM((Rt"on_configureprimaryprinter_commandϋs    !cCsdS(N((R6RH((Rt$on_configuresecondaryprinter_command#scCsΊh|_|iiiƒ|id<|iiiƒ|id<|iiiƒ|idRCRRDRJRFR8R9tupdatetwrite(R6RH((RRL)s cCs dGHdS(Nssave!((R6RH((Rton_savecommand_command?scCs|iidƒdS(NR4(R6R8t testlayout(R6RH((Rton_testlayout_commandCs( t__name__t __module__RIRGR^R_RLRdRf(((RR-—s F  (   (t PythonCardtmodeltdialogtsysRUR RNR\RVRWtargvtcurrent_directory_rawtsplitRXtreplacetgetenvt program_filestexistsRZRR RRR#R)R,tPageBackgroundR-(RRZRXRrR RRR-RlR\RkR)R,R RjR#RURnRN((Rt?s(     $