MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/share/printconf/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/printconf/util/addQueue.pyo
m
^Dc@sdkZdkZdkZdkZdkZdkZdkZdkZdkZdk	Z	dk
Z
dZdkl
Z
lZeiiedeiieiiZeiieiiZdZdfdYZdS(Nt	printconf(t_sN_s/usr/share/localecCsVti|dtiti|}|i||iti	|i
|idS(sPut up an error dialog.iN(tgtkt
MessageDialogtwindowt
MESSAGE_ERRORt
BUTTONS_OKtmsgtdtset_transient_fortset_positiontWIN_POS_CENTER_ON_PARENTtruntdestroy(RRR((t%/usr/share/printconf/util/addQueue.pytcomplain+s!

taddQueuecBstZdZdZdZdZdZdZedZ	dZ
dZd	Zd
Z
dZdZd
ZedZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"d Z#d!Z$d"Z%d#Z&d$Z'd%Z(d&Z)d'Z*d(Z+d)Z,RS(*s6The GNOME druid implementation for adding a new queue.cCs||_||_|id|_|id|_|id|_|id|_|id|_|id|_	|id|_
|id|_|id	|_|id
|_
|id|_|id|_|id
|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_|id|_ |id|_!t"i#t$t$|_%|i%i&dt"i'|i
i(|i%|i
i)dt"i*t+d t"i,d!d}|i.t/|i&d|i
i0|t"i*t+d"t"i,d!d#}|i.t/|i&d#|i
i0|t"i#t$t$t1i2t1i2t$t$|_3|ii(|i3|i%i&dt"i't"i*t+d$t"i,d!d}|i.t/|i&d|ii0|t"i*t+d%t"i,d!d#}|ii0|t"i#t$t1i2|_4|i i(|i4t"i*t+d&t"i,d!d}|i.t/|i&d|i i0||i i5}|i7|i8|ii9d'|i:|i;d(|i<|i;d)|i:|i;d*|i=|i;d+|i>|i;d,|i?|i;d-|i@|i;d.|iA|i;d/|iB|i;d0|iC|i;d1|iD|i;d2|iE|i;d3|iF|i;d4|iG|i;d5|iH|i;d6|iI|i;d7|iJ|i;d8|iK|i;d9|iL|i;d:|iM|iiMiNt+d;dS(<NtaddQueueWindowtadd_queue_druidtadd_queue_type_menutadd_queue_type_notebooktadd_queue_name_entrytadd_queue_description_entrytadd_queue_device_viewtcustomDeviceDialogtdevice_entrytadd_queue_ipp_server_entrytadd_queue_ipp_path_entrytadd_queue_lpd_server_entrytadd_queue_lpd_queue_entrytadd_queue_smb_viewtpasswdDialogtsmb_workgroup_entrytsmb_server_entrytsmb_share_entrytsmb_user_entrytsmb_passwd_entrytadd_queue_ncp_server_entrytadd_queue_ncp_user_entrytadd_queue_ncp_queue_entrytadd_queue_ncp_passwd_entrytadd_queue_jd_printer_entrytadd_queue_jd_port_entrytadd_queue_model_labeltadd_queue_mfr_menutadd_queue_printer_viewtadd_queue_notes_buttonitDevicettexttDescriptionitSharetCommenttModelR
ton_add_queue_start_page_prepareton_add_queue_druid_cancelton_add_queue_druid_helpt"on_add_queue_rescan_button_clickedt"on_add_queue_custom_button_clickedton_add_queue_type_menu_changedt!on_add_queue_notes_button_clickedton_add_queue_name_page_prepareton_add_queue_name_page_nextton_add_queue_type_page_preparet#on_add_queue_smb_view_row_activatedt"on_add_queue_smb_view_row_expandedt on_add_queue_smb_specify_clickedton_add_queue_type_page_nextton_add_queue_model_page_prepareton_add_queue_mfr_menu_changedton_add_queue_model_page_nextt on_add_queue_finish_page_prepareton_add_queue_finish_page_finishtFinish(Otparenttselftxmlt
get_widgetRtdruidt	type_menutnotebookt
name_entryt
desc_entrytdevice_viewt
custom_dialogtcustom_device_entrytipp_server_entrytipp_path_entrytlpd_server_entrytlpd_queue_entrytsmb_viewt
passwd_dialogR R!R"R#R$tncp_server_entrytncp_user_entrytncp_queue_entrytncp_passwd_entrytjd_printer_entryt
jd_port_entrytselect_model_labeltmfr_menutprinter_viewtnotes_buttonRt	TreeStoretstrtdevice_storetset_sort_column_idtSORT_ASCENDINGt	set_modeltset_search_columntTreeViewColumnRtCellRendererTexttcolt
set_resizabletTruet
append_columntgobjectt
TYPE_PYOBJECTt	smb_storet
printer_storet
get_selectiontslcttset_select_functiontprinter_select_functiontconnectR
tsignal_connecttprepare_start_pagethelptrescan_button_clickedtcustom_button_clickedttype_menu_changedtnotes_button_clickedtprepare_name_pagetvalidate_name_pagetprepare_type_pagetsmb_view_row_activatedtsmb_view_row_expandedtsmb_specify_clickedtvalidate_type_pagetprepare_model_pagetmfr_menu_changedtvalidate_model_pagetprepare_finish_pagetfinisht	set_label(RJRIRKRwRn((Rt__init__6s		



	



	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
cCs,|ii|iiotindS(s&Callback for the window being deleted.N(RJRthideRIthiddenRt	main_quit(RJRM((RR
s

cCsF|iit|iiitxtiotiq&WdS(s!Set the druid window insensitive.N(	RJRt
set_sensitivetFalset
set_cursortbusy_cursorRtevents_pendingtmain_iteration(RJ((Rtbusys
cCs'|iiit|iitdS(sSet the druid window sensitive.N(RJRRtready_cursorRRp(RJ((RtreadyscCsd}d}|iii\}}xZ|i||p|i||o1|djo
d}q't	t
|d}q'W||S(sMake up a name to start with.tprintertt1iN(tbasetextRJRItconft
get_queuestname_dict_dicttalias_dict_dictthas_keyRftint(RJRRRR((Rtmake_up_names(

cCs|ii|iidd|_|ii|i|i	id|i
id|i|i
|i
|iid|iid|ii|iid|iid|iit|_|iid|iid|iid|iid|ii|iid|iid|ii|ii|i|_h|_|ii |i!d|id|i"i"|i!}|i$|i%}|i'i(d}|i'i*||t+d	d|i,i-t|o|i/d
od}d}t2i3|}t2i3|}|i6|}
|
o"|
i7\}
}}}d
}n6|i6|}
|
o|
i7\}
}}}}n|
pd
Sn|
o|
i>d}
n|o|i>d}n|ii?i@|iiAi?iB}|i
i||i
iD}||jod
Sn|iF}d}x|D]}	|iI|	i&}|iK|diL|iLjoR|iK|d}|p)|dp|diL|iLjo
d}nPqSqSW|oyx4|iN|o#|iO|d}|iQ|qW|iK|d}|dp!||d<|iR|d|qnZtSiT|}|o||d<n|iUd
}|iR|d||iR|d||iU|}|iR|d||iR|dtWd|iR|d|
|iR|d||iX}d|_Z|i[|i$|t+|`Z|i\i]||i(d}|i*|i$||t+d	dqn|i"i^|ii_|i"i`taib|iic|i"idd
S(sRun the druid.tadd_queue_start_pagesprintconf-local-printer.htmlRis/printers/queue1t9100tid_dictRf0.5ssmb:s)^smb://([^:]+:)?([^@]+@)?([^/]+)/([^/]+)$s1^smb://([^:]+:)?([^@]+@)?([^/]+)/([^/]+)/([^/]+)$Nt:t@itGROUPis(Specified)ii(eRJRMtset_pageRKRLt	help_pageRPtset_textRRQRNtset_historyRtpopulate_device_viewRURVt
grab_focusRWRXRt
smb_forcedR[R\R]R^R_R`RItpopulate_mfr_optionmenuRbtmfr_listt
id_to_itertpopulate_model_storeRuRtstoretget_pathtget_iter_firsttpathRct
get_columnRntscroll_to_cellRpRdRturlt
startswithttype1ttype2tretcompilettype1_rettype2_retmatchtgroupstusertpasswordtservertsharetNonet	workgrouptrstriptqueue_typestindexRtsmbtsmb_typetget_historyttRttfoundtrowtget_itertserver_itert	get_valuetlowertdicttiter_has_childtiter_nth_childtitremovet	set_valuetpysmbt
get_host_infotappendtiterRRYtviewt
expanding_rowt
expand_rowRvtselect_iterR	ttoplevelR
RtWIN_POS_NONERtshow_all(RJRRRRRRRRRRRRRRRRRRRRRRnR((Rt
addQueueDruids	


	

			
!
	%1
	
		
cCs*tid|iiii|ifdS(s5Help button handler.  Shows help page self.help_page.sfile://%s/%sN(tgnometurl_showRJRIRtprintconf_help_dirR(RJRM((RR}{scCs
d|_dS(s.Prepare the start page.  Set the help context.sprintconf-local-printer.htmlN(RJR(RJtpageRM((RR|scCsd|_|iidS(s-Prepare the name page.  Set the help context.sprintconf-local-printer.htmlN(RJRRPR(RJRRM((RRs	cCs|ii}|iii|p+t|it	d|ii
tSn|iii\}}|i|o+t|it	d|ii
tSn|i|o+t|it	d|ii
tSntS(sj
        Validate the name page.

        Return value: whether there is a problem with the page.
        sInvalid names(There is already a queue with that name.s,An existing queue has an alias of that name.N(RJRPtget_texttnameRIRtvalid_queue_nameRRRRRpRRRRR(RJRRMRRR((RRs$
	

	

cCs
d|_dS(s-Prepare the type page.  Set the help context.sprintconf-local-printer.htmlN(RJR(RJRRM((RRscCs|idddS(sHandler for the rescan button.tforceiN(RJR(RJtbutton((RR~scCsT|i}|iid|i|i|iti	|i
}|ii}|i|tijp|odSnti|tip"t|itd|dSn|iid}|ii|d||ii|dtd|iii||ii|}|iid}|ii!||t"dddS(s Handle the custom device button.RNs('%s' does not exist, or is not writable.iis
Custom devicef0.5(#RJRStdialogRTRR	RR
RRRtresponseRtdeviceRtRESPONSE_OKtostaccesstW_OKRRRgRRRRRRRvRRRRRnRRp(RJRRRRnRRR((RRs*	
	c
Csg|iii||_|i}	g}|	i	x|ii
D]}|	id
}|	i|d|yG|i|d}|id}|pd|d|df}nWn
d}nX|	i|d||o|i|qAqAWt|djoa|d}|iii||	i|}|iid}|ii||td	dnd
S(s:Find local printer devices and populate self.device_store.itautotdescs%s %stmanufacturertmodelRif0.5N(RJRIRtscan_local_printer_devicesRt
local_devsRgRtautoitertcleartkeystdevRRRRRtgettdescriptiontlenRRRvRRRRRnRRp(
RJRR	RRRRRRnR((RRs2	
 

cCs|ii}|ii||_|ii|||ii	jo|ii
|}|ipt
i|idt
it
i|i}|i|i|it
i|i}|i|t
ijo
t|_q|iidn|indS(s|
        Handler for the type optionmenu.  Set the notepad page appropriately,
        as well as the help context.
        iN(RJRNRtwhichRItqueue_type_help_pagesRROtset_current_pagetsmb_page_indexRt
type_spacetcheckRRRtMESSAGE_WARNINGtBUTTONS_YES_NOtmessagetaskR	R
RRRR
tRESPONSE_YESRpRRtbrowse_smb_hosts(RJt
optionmenuRRRR((RRs$


c
CsV|ii|ii}||iiiijo|io|i	ot
i|idt
i
t
i|i}
|
i|i|
it
i|
i}|
i|t
ijo|iitSqn|iii}||ijo|iotSqn||ijo|iotSqn||ijo|i otSqn|||ijo|i!otSqnS||i"jo|i#otSqn*||i$jo|i%otSqn||i$joE|i&|i'|i(i)}|i+|djot-Sqin?||ijo*|i.i/}|i1\}}|i4|d}y|i6|d}t8i9|d}t8i9|d}|iii<||i*}|pd}
t8i9|d}	x5|	i?dD]$}|iAdjod}
PqqW|
o,|iiiBiC}|d	d
i*}dGHqRnWqit-SqiXnt-S|iiiBiE|iF}|iGiH|iIiJ|h|_K|iiL|iMd|iKd
|d|d|ii}|iNi/iO||iMiP|}|iNiRd}|iNiT||tddxt
iUot
iVq6Wt-S(sj
        Validate the type page.

        Return value: whether there is a problem with the page.
        iRRRtcmdsett,t
postscriptitGenericsPostScript Printers2Printer is PostScript-capable:selecting generic PSRtmfrtidRf0.5N(WRJRIRRNRRRRRRRRRRRRRR	R
RRRR
RRRpttypestlocaltvalidate_local_typetipptvalidate_ipp_typetlpdtvalidate_lpd_typetvalidate_smb_typetncptvalidate_ncp_typet	jetdirecttvalidate_jetdirect_typeRtdetect_snmp_printerR_RRRRRRRRvt	selectiontget_selectedRRRRRRtstringRRtmdltfoomatic_match_printert
ps_capableRtsplitteachtstriptfoomatictmake_model_dict_dictt
make_modelRtmakeRbRRRRRRuRcRRRRRnRRR(RJRRMR+R.RRRR6RR0RRnRRRRRRRR2((RRs2










			
cCsJ|ii}|i\}}|pt|it	dt
SntS(sj
        Validate the local type data.
        
        Return value: whether there is a problem.
        sYou must select a device.N(RJRRRvR+R,RRRRRRpR(RJR+RR((RR xscCs|ii}|ii}|p+t|itd|ii	t
Sn|p+t|itd|ii	t
SntS(s_Validate the IPP type data.
        
        Return value: whether there is a problem.
        sYou must specify a server.sYou must specify a path.N(RJRURt
ipp_serverRVtipp_pathRRRRRpR(RJR9R8((RR"s

cCs|ii}|ii}|p+t|itd|ii	t
Sn|p+t|itd|ii	t
SntS(s_Validate the LPD type data.
        
        Return value: whether there is a problem.
        sYou must specify a server.sYou must specify a queue.N(RJRWRt
lpd_serverRXt	lpd_queueRRRRRpR(RJR;R:((RR$s

cCs|iii\}}|pt|itdt	Sn|i
|}|pt|itdt	Snd|i|d|i|df}|p+t|itd|iit	Sny|i|dd}Wn
d}nX|i|d	}
|i|d
}|}|i|d}
|i|d}	|ii||ii|
|iit|ii|	|iid|iid|
o|ii|
n|o|ii|n|ii|i|iit i!x|i"ot	}Pn|iii$t%xt i&ot i'q0Wt(i)|d|d
|
d|}|iii$t*|oPn|
p|iin|ii|ii+}|ii-|t i.jp|t i/joPn|ii0}||jo3|i|d}||d<|i2|d|n|ii0}|i4do6|di5d}|djo|d|}qn|i2|d|d|
|f}|ii0}
|ii0}|i2|d	|
|i2|d
|qW|S(sc
        Validate the SMB data.
        
        Return value: whether there is a problem.
        s)You must choose an SMB share to print to.s$You must choose a share, not a host.s//%s/%sis*You must specify an SMB share to print to.iRRiiitgroupRtpasswdis//t/iN(7RJRYRvR,RRRRRRptiter_parenttparent_iterRt	smb_shareR"RR<RR=t
orig_groupRt
orig_shareR RR!tset_editableRR#R$RZR	R
RRRt
accessibleRRRRRtprinter_share_accessibleRRRRtRESPONSE_CANCELtRESPONSE_DELETE_EVENTRRRt	sharenameRtfindtq(RJRER@R<RIRRR=RARCRRRRRKRB((RR%s	
	
(	




	

 


cCs|ii}|ii}|p+t|itd|ii	t
Sn|p+t|itd|ii	t
SntS(s_
        Validate NCP data.
        
        Return value: whether there is a problem.
        s+You must specify an NCP server to print to.s+You must specify a queue on the NCP server.N(RJR[Rt
ncp_serverR]t	ncp_queueRRRRRpR(RJRLRM((RR's	

	

cCs|ii}|ii}|p+t|itd|ii	t
Snyt|}Wn.t|itd|ii	t
SnXt
S(se
        Validate JetDirect data.
        
        Return value: Whether there is a problem.
        s1You must specify a JetDirect printer to print to.s#You must specify an IP port number.N(RJR_Rtjetdirect_ipR`tportRRRRRpRtjetdirect_portR(RJRPRORN((RR)6s	


cCs|i}|iy|iiitWnnXxtioti	q7Wt
i}d}xW|iD]I}||}|id}|i|d|d|i|d|qrW|o|i|}ny|iiitWnnXdS(sInitialise the SMB tree store.itDOMAINiN(RJRtRRRRRRRRRtget_domain_listtdomainsRRRtdomainRRRtdummyR(RJRURRTRRSR((RRRs0	



cCsn|i}|i|}|i|djodSn|i|o|i	|n|i
|||dS(s*Handle double-clicks in the SMB tree view.iN(RJRtRRRRt
iter_depthRtrow_expandedtcollapse_rowR(RJRRtcolumnRR((RRns	c
Cs|i}yt|}Wn
d}nXt|djoBy|iodSnWnd|_nX|i	|d}|o|iii
tti|}
x4|i|o#|i|d}|i|qWxs|
iD]e}|i|}|i|d||i|d|
||i|dd|i|ddqW|iii
tn|i|d|`nLy|iodSnWnd|_nX|i	|d}	|	o|iii
txtioti qWg}ti"|	d	}x4|i|o#|i|d}|i|qWxW|iD]I}||}|i|}|i|d|d
|i|d|qOW|iii
tn|i|d|`dS(s1Handler for expanding a row in the SMB tree view.iNiiiiRitIPtNAME($RJRtRtlistRtl_pathRR
RRRthostRRRRtget_printer_listtprintersRRRRRRRRRRRRTRRRthostst
get_host_listth(
RJRRRRRRcR^RaRTR`R]R((RR~sp	









cCstid}|iid|iid|iit|i	id|i
id|iid|i	i|i
i|i|i
itixC|i
i}|i
i|tijp|tijoPn|ii}|ii}|i	i}|i
i}
|ii}|idd}|i|}|pd|d|}n|iii t!xti"oti#qWt$i%|d	|d
|
d|}|iii t'|p
|i(o|i|}|i)\}	}|i,}d}xD|D]<}|i0|i1}|i3|d|	jod}PqqW|o;x|i4|o#|i5|d}|i7|qgWnjt$i8|	}
|o|
d
o|d
|
d
<n|i:d}|i<|d|	|i<|d|
|i:|}|i<|d||i<|dt>d|i<|d|
|i<|d||i?}d|_A|iB|iC|t|`A|iDiE||iFd}|iH|iC||tddPqqWtS(s$Allow the user to specify the share.s^//([^/]+)/(.*)$RtMACHINERis\R>s//R<RR=iRis(Specified)iif0.5N(IRRtshare_reRJR RR!RDRpR"R#R$RRZR	RR
RRRRRRGRHRR<RRRR=treplaceRRRRRRRFRERRRtmachineRIRtRRRRRR@RRRRRRRRRRRRRYRRRRRvRRRnR(RJRRERRReRR<RIRgRRR=RRRR@RRRRnR((RRs

 
					

cCsqd|_td}|ii|ii}|ii	i}||ijotd}n|ii
|dS(s.Prepare the model page.  Set the help context.sprintconf-select-model.htmls*Select the printer manufacturer and model.sSelect the printer manufacturer and model. Depending on how the remote queue is configured, you may need to select the generic PostScript option here.N(RJRRtlabelRIRRNRRRRR#RaR(RJRRMRhRR((RRs	cCsy|i|i}WndSnXh|_|ii|id|id|d|i	i	|i
id}|i
i
d|tdddS(sUpdate the model list.NRRRif0.5(i(RJRtmenuRRRRIRRuRRcRRnRRp(RJRiRRn((RR's		cCse|ii|}|ii|d\}}|o
t}nt
}|ii||ii
|S(s9Don't allow this path to be selected unless it is a leaf.iN(RJRuRRRRRRRptnotes_availableRRdRR(RJRRRRjR((RRy6s
cCs|ii}|i\}}|pdSn|i|d\}}|o^y|i
iii
|i}Wn$|i
iii
|id}nX|i
i|||ndS(sHandler for the notes button.Nii(RJRcRvR+R,RRRttypet
printer_idRIRR4Rtdrivertdriverst
show_notes(RJRR+RmRRlRkR((RRBs!cCs|ii}|i\}
}|pt|it	dt
Sn|
i|d\}}
||iiiijotSn|iiii}y:||
i}|||
ijo||
id}nWn||
id}nX|iii}y|i|}WntSnX|ipyti|idtiti|i}|i |i|i!ti"|i#}	|i%|	ti&jot
SqntS(sY
        Validate model page.

        Return value: whether there is a problem.
        s You must select a printer model.iiN('RJRcRvR+R,RRRRRRpRRmRRIRRnR4RRtfoomatic_drivertdriver_blacklistt	blacklistRtblackRRRRRRRR	R
RRRR
R(RJRRMR+RmRRrRRsRRRRpR((RRSs>


cCs|d|_td}|td7}|ii}|ii||_	||i	i
d7}||i7}|i
|dS(s/Prepare finish page text, and set context help.s/printconf-select-model.html#S2-PRINTING-CONFIRMs&About to create the following queue:

sType: s
N(RJRRR0RNRt
type_indexRIRtqueue_type_spacetlong_pretty_nametpulltpageedgeR(RJRxRMR0Rt((RRs	cCs|iii}
d}	d}tii	dotid}|dd!djp<|dd!djp(|dd!djp|dd!djo
d	}	n|dd!djo
d
}n|dd!djo
d}n|dd!d
jo
d
}n|dd!djo
d}qnh}hdd	<d|	<d|	<}
|
|d<|djo||d<n|i
i|d<|ii|d<|i|
ijo|i|}n|i|
ijo|i|}n|i|
ijo|i|}ns|i|
ijo|i|}nM|i|
ijo|i|}n'|i|
ijo|i|}n|dtd7}|ii }|i"\}}|i%|d	\}}||f|_(|o2|iii)i*|}||i,d|i-7}n||i.7}||_/|S(s3Pull in the (validated) data from all of the pages.itCtLANGitzhtkotjatruitja_JPtko_KRitzh_CNtzh_TWtconvert_text_to_Postscripttassume_data_is_texttrerender_Postscripttmf_flagst
filter_localet
queue_nametqueue_descriptions
s	Printer: t N(0RJRIRRRtrerendertlocaleRtenvironRtlangtdatatflagsRPRRQRuRt
pull_localR0R!tpull_ippR#tpull_lpdRtpull_smbR&tpull_ncpR(tpull_jetdirectRRcRvR+R,RRRRmRtdriver_tupleR4RtfR7RRht
queue_data(RJRR+RmRRRRRRRR0RR((RRws\
P



!


	cCsK|ii}|i\}}|i|d}||d<t
d|S(sPull local data.itlocal_printer_devicesDevice: N(RJRRRvR+R,RRRRRR(RJRR+RRR((RRs
cCsS|ii|d<d|d<|ii|d<d|d|d|df}|S(sPull IPP data.R8t631tipp_portR9s
ipp://%s:%s%sN(RJRURRRVR0(RJRR0((RRs
cCsJ|ii|d<|ii|d<td|dd|d}|S(sPull LPD data.R:R;sQueue: RN(RJRWRRRXRR0(RJRR0((RRs
 c	Cs|iii\}}|i|}d|i|d|i|df}|i|d}|i|d}|i|d}||d<|ido|d|d<nd	|d<|id
o|d
|d<nd	|d<||d<||d
<td|dS(sPull SMB data.s//%s/%siiiiRARZtsmb_ipRRt
smb_workgrouptsmb_usertsmb_passwordsShare: N(RJRYRvR,RRR?R@RRARcRt
smb_passwdRRR(	RJRRRcRARR@RR((RRs"(




cCsj|ii|d<|ii|d<|ii|d<|ii|d<td|dd|dS(sPull NCP data.RLRMtncp_usertncp_passwordsQueue: RN(RJR[RRR]R\R^R(RJR((RRscCsD|ii|d<|ii|d<td|dd|dS(sPull JetDirect data.RNRPsPort: RN(RJR_RRR`R(RJR((RR
scCs|i\}}d}||iiii	joP|iii	i
}	|	|}y
|i}Wn|id}nX||f}n||f}
|iii
|i|i|
|ii}|id}|id}|i|d||i|d|id|iii\|i_|i_|i|d|ii||iiii||iii|i_|ii|ii|ii|iit |i!i"t#i$dt#i%o"|ii&o|ii't(d}n
t(d	}t*i+|ii,dt*i-t*i.|}|i0|ii,|i1t*i2|i3}
|i5|
t*i6jox|ii&p|ii'nt7i8d
||iiii9jo|ii:|ii;q|ii:|ii<qndS(s.Handler for the finish button.  Add the queue.iRiiRis!/usr/share/cups/data/testprint.pss$Would you like to print a test page?srWould you like to print a test page?
Answering 'yes' will apply all changes
and print a test page to this printer.i
N(=RJRRmRRtfoomatic_tupleRIRRnR4RRRptconstruct_queueRuRtqueue_storeRRRRRt	name_dictt
alias_dictt
queue_viewRvRtget_default_queue_nametdefault_queue_nametfix_default_markertqueue_chosentneed_to_apply_changesRpRRRRtR_OKRtapplyRRRRRtMESSAGE_QUESTIONRRR	R
RRRR
RttimetsleepR0ttestt
ascii_testt	cups_test(RJRxRMRpRRRRRmRRRRRRR((RRs\



$



	


cCs,d}d}d}||d}d}d}x<|D]4}|i	|o|t
|id}Pq7q7W|o|||}d}x|D]}|i	|pqn|iddjpqn|t
|idi
d	}|iii|}d}	d}y\|d
ii
d}	|dii
d}|	|f}
|iiii|
i}PWnrtj
ofd
G|GHdGHdGHdGH|	o@|o9|iii|	|}|o|i}d|GHqqnXyL|d}x;|idD]*}|ii
djod}PqqWWqqXqWn|p||d}d}x|D]v}|i	|pqan|t
|id}y|iiii |i}PWqad|GHdGHdGHdGHqaXqaWn|oA|o:y,|iiii!}
|
ddi}dGHWq(q(Xn|S(sDetect an SNMP printer by name.cCsYd}d|}|tid<|tid<titititi	|}|iS(Ns-v 1 -c public -Ovs0/usr/bin/snmpwalk %s "$AGENT" "$OID" 2>/dev/nulltAGENTtOID(toptstctagentRRtoidtsignaltSIGCHLDtSIG_DFLtpopenRt	readlines(RRRRR((Rtsnmpwalk\s


issystem.sysObjectID.0sOID: s
sSTRING: t;it"RRRsNo IEEE 1284 match:s'Please report this message in Bugzilla:s&  https://bugzilla.redhat.com/bugzillas#Choose 'foomatic' as the component.sGuessing at %s for matchRRRis!HOST-RESOURCES-MIB::hrDeviceDescrsNo SNMP match: '%s'RsPostScript Printers3Printer is PostScript-capable: selecting generic PSN(#RRRR0RtlsRtlookfortlRR
RRJR3RJRIRtparse_ieee1284_deviceidtdeviceidRR.RttupleR4tautodetect_dicttKeyErrorR/tpRR1R2tdescrt	snmp_dictR5R6(RJRRR.RR0RRRRR6RR2RRRRR((RR*Zs			"		

		(-t__name__t
__module__t__doc__RR
RRRRRR}R|RRRR~RRRRR R"R$R%R'R)RRRRRRRyRRRRwRRRRRRRR*(((RR3sT		
								"					j				m					D	U					0		A									B(tgettextRRt	gtk.gladeRrRRRR-RRRTtrhpl.translateRtN_tgladetbindtextdomaintgdktCursortWATCHRtLEFT_PTRRRR(RTRRRRRRRRRRRrRRRRR-((Rt?s"												

Anon7 - 2021