403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/landscape/ui/view/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyc
ó
}9Rc@s¡ddlZddlZddlmZddlmZmZddlmZm	Z	m
Z
ejdƒZd„Z
d„Zd„Zd	ejfd
„ƒYZdS(iÿÿÿÿN(tgettext(tGObjecttGtk(tCANONICAL_MANAGEDt
LOCAL_MANAGEDtNOT_MANAGEDsT^(([a-zA-Z][a-zA-Z0-9\-]*)?[a-zA-Z0-9][\.]?)*(([A-Za-z][A-Za-z0-9\-]*)?[A-Za-z0-9])$cCs
|jƒS(s/
    Do some minimal host name sanitation.
    (tstrip(t	host_name((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytsanitise_host_namescCstj|ƒdk	S(sh
    Check that the provided host name complies with L{HOST_NAME_REGEXP} and is
    therefor valid.
    N(tHOST_NAME_REGEXPtmatchtNone(R((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytis_valid_host_namescCs.y|jdƒtSWntk
r)tSXdS(sT
    Test that the provided string contains only characters from the ASCII set.
    tasciiN(tdecodetTruetUnicodeDecodeErrortFalse(ttext((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytis_asciis


tClientSettingsDialogcBsaeZdZdZdZdZd„Zd„Zd„Zd„Z	d„Z
ed	„ƒZed
„ƒZ
ed„ƒZed„ƒZed
„ƒZed„ƒZed„ƒZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d „Z#d!„Z$d"„Z%RS(#s°
    L{ClientSettingsDialog} is a subclass of Gtk.Dialog that loads the UI
    components from the associated Glade XML file and wires everything up to
    the controller.
    slandscape-client-settings.gladeiicCs‘tt|ƒjdtdƒdtjjƒ|jdƒ|jt	ƒt	|_
tƒ|_g|_
||_|jƒ|jƒ|jjƒdS(NttitlesLandscape Servicetflagsspreferences-management-service(tsuperRt__init__t_RtDialogFlagstMODALtset_default_icon_namet
set_resizableRt_initialisedtsett_validation_errorst_errored_entriest
controllertsetup_uit	load_datatrevert(tselfR"((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyR5s


			

cCs-|jtjjtjƒ|jj|ƒdS(sb
        Show a warning icon on a L{Gtk.Entry} to indicate some associated
        error.
        N(tset_icon_from_stockRtEntryIconPositiontPRIMARYtSTOCK_DIALOG_WARNINGR!tappend(R&tentry((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytindicate_error_on_entryDscCst|jjƒƒ}t|ƒ}t|ƒ}|rM|rM|jj|ƒtS|j|jƒ|sy|jj	|j
ƒn|s•|jj	|jƒntSdS(N(
Rtlocal_landscape_host_entrytget_textRRtset_textRR-R taddtINVALID_HOST_NAMEtUNICODE_IN_ENTRYR(R&Rtascii_okthost_name_ok((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyt%check_local_landscape_host_name_entryMscCs>t|jƒƒrtS|j|ƒ|jj|jƒtSdS(sN
        Check that the text content of a L{Gtk.Entry} is acceptable.
        N(RR/RR-R R1R3R(R&R,((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytcheck_entry]s

cCsÔtƒ|_|jjƒr+|jdƒn|jj|jj	ƒƒ}|jj
|dƒ\}|tkrntS|t
kr¨|j|jƒ}|j|jƒ}|o§|S|jƒ}|j|jƒ}|oÏ|SdS(Ni(RR t_info_bar_containertget_visibletdismiss_infobarRt	liststoretget_itertuse_type_comboboxt
get_activetgetRRRR7thosted_account_name_entrythosted_password_entryR6tlocal_password_entry(R&tactive_itertmanagement_typetaccount_name_oktpassword_okR5((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytvalidity_checkhs	
cCs
tdƒS(NR(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytNO_SERVICE_TEXTzscCs
tdƒS(NsLandscape - hosted by Canonical(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytHOSTED_SERVICE_TEXT~scCs
tdƒS(NsLandscape - dedicated server(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytLOCAL_SERVICE_TEXT‚scCs
tdƒS(NtRegister(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytREGISTER_BUTTON_TEXT†scCs
tdƒS(NtDisable(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytDISABLE_BUTTON_TEXTŠscCs
tdƒS(NsInvalid host name.(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytINVALID_HOST_NAME_MESSAGEŽscCs
tdƒS(Ns"Only ASCII characters are allowed.(R(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytUNICODE_IN_ENTRY_MESSAGE’scCs‚|jjƒ}x;|jj|dƒd|jjkrL|jj|ƒ}qW|jj|ƒ}|jƒ\}|jj	|ƒdS(s_
        Load the persisted L{management_type} from the controller and set the
        combobox appropriately.

        Note that Gtk makes us jump through some hoops by having it's own model
        level to deal with here.  The conversion between paths and iters makes
        more sense if you understand that treeviews use the same model.
        iN(
R;tget_iter_firstR?R"RDt	iter_nexttget_pathtget_indicesR=t
set_active(R&t	list_itertpathtindex((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyt&_set_use_type_combobox_from_controller–s	cCs0|jj|jjƒ|jj|jjƒdS(N(R@R0R"thosted_account_nameRAthosted_password(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyt"_set_hosted_values_from_controller§s	
cCs0|jj|jjƒ|jj|jjƒdS(N(R.R0R"tlocal_landscape_hostRBtlocal_password(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyt!_set_local_values_from_controller¬s	
cCsAt|_|jjƒ|jƒ|jƒ|jƒt|_dS(N(RRR"tloadR\R_RYR(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyR$±s	



cCsštjtjtjtjƒ}d|_|jt|j	|j
jdƒgƒ|jt|j
|j
jdƒgƒ|jt|j|j
jdƒgƒ|S(s
        Construct the correct L{Gtk.ListStore} to drive the L{Gtk.ComboBox} for
        use-type.  This a table of:

           * Management type (key)
           * Text to display in the combobox
           * L{Gtk.Frame} to load when this item is selected.
        sno-service-frameshosted-service-frameslocal-service-frameN(Rt	ListStoreRt
TYPE_PYOBJECTtTYPE_STRINGRt
active_widgetR+RRHt_buildert
get_objectRRIRRJ(R&R;((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytmake_liststore¹s		cCs`|jjdƒ|_|jjd|jdƒ|jjdƒ|_|jjd|jdƒdS(Nshosted-account-name-entrytchangedRZshosted-password-entryR[(ReRfR@tconnectton_changed_eventRA(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytlink_hosted_service_widgetsÎs				cCs`|jjdƒ|_|jjd|jdƒ|jjdƒ|_|jjd|jdƒdS(Nslocal-landscape-host-entryRhR]slocal-password-entryR^(ReRfR.RiRjRB(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytlink_local_service_widgetsÙs				cCst|jjdƒ|_|jjd|jƒ|jj|ƒtjƒ}|jj|t	ƒ|jj
|ddƒdS(Nsuse-type-comboboxRhRi(ReRfR=Riton_combo_changedt	set_modelRtCellRendererTextt
pack_startRt
add_attribute(R&R;tcell((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytlink_use_type_comboboxäscCs|jtjjƒdS(N(tresponseRtResponseTypetCANCEL(R&twidget((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytcancel_responseìscCsœ|jƒr"|jtjjƒnvg}|j|jkrM|j|jƒn|j	|jkrr|j|j
ƒn|jjdj
|ƒƒ|jjƒdS(Ns
(RGRtRRutOKR3R R+RPR2ROtinfo_messageR0tjoinR8tshow(R&Rwt
error_text((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytregister_responseïscCsf|jjƒ\}|jƒ\}|jƒ\}}|tkrR|j|jƒn|j|jƒdS(N(tregister_buttontget_childrenRR0RNRL(R&RDt	alignmentthboxtimagetlabel((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytset_button_textûscCs	tjdtjƒ|_|jj|jttdƒ|jjd|jƒ|jj	ƒtjdtj
ƒ|_|jj|jttdƒ|jj	ƒ|jjd|jƒtjdtj
ƒ|_|jj|jttdƒ|jj	ƒ|jjd|jƒdS(Ntstockitclicked(RtButtontSTOCK_REVERT_TO_SAVEDt
revert_buttontaction_areaRpRRiR%R|tSTOCK_CANCELt
cancel_buttonRxtSTOCK_OKRR~(R&((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyt
setup_buttonss


cCsD|jjƒx'|jD]}|jtjjdƒqWg|_dS(N(R8thideR!R'RR(R)R(R&RwR,((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyR:s
cCsÈ|jjdƒ}|jjdƒ}|jtƒ|jtƒtjƒ|_|jjdƒtjƒ}|j	|ƒ|j
ƒtjƒ}|j	|ƒ|j
ƒ|jj|dtdtddƒ|jj|dtdtddƒ|j
ƒ}tjƒ}tjƒ|_|jjddƒ|jj
ƒ|j|jdtdtdd	ƒtjd
ƒ}|jd|jƒ|j
ƒ|j|dtdtddƒ|j
ƒ|j|dtdtddƒdS(Nslabels-sizegroupsentries-sizegroupitexpandtfilltpaddingigà?itDismissR‡(ReRftset_ignore_hiddenRRtHBoxR8tset_spacingtInfoBart
add_widgetR|tLabelRptget_content_areaRzt
set_alignmentRRˆRiR:(R&tlabels_size_grouptentries_size_grouptinfo_bartempty_labeltcontent_areaR‚t	ok_button((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytsetup_info_bars8







"

cCs*tjƒ|_|jjdƒ|jjtjjtjjt	ƒd|j
ƒƒ|jƒ}|jdƒ|j
dƒ|jƒ|jjdƒ|_|jjƒ|j|jdtdtddƒ|jj|jdtdtddƒ|jƒ|_|j|jƒ|jƒ|jƒ|jƒdS(	Nslandscape-clienttuiis
toplevel-vboxR‘R’R“i(RtBuilderRetset_translation_domaint
add_from_filetosRWR{tdirnamet__file__t
GLADE_FILER›R—tset_border_widthR£Rft_vboxtunparentRpRR8RRgR;RsRkRlR(R&R¡((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyR#6s(		






cCsÆ|jj|jƒƒ}|jdk	r=|jj|jƒn|jj|dƒ\}|j|ƒ|j	r‡||j
_|j
jƒn|jj|dƒ\|_|jj
ƒ|jj|jƒdS(Nii(R;R<R>RdRR­tremoveR?R…RR"RDtmodifyR®R1(R&tcomboboxRVRD((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyRmLs
	
cCs*t|j||jƒƒ|jjƒdS(N(tsetattrR"R/R°(R&Rwt	attribute((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyRjYscGs|jƒdS(N(tdestroy(R&targs((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pytquit]scCs(|jjƒ|jƒ|jjƒdS(N(R"R%R$(R&tbutton((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyR%`s

(&t__name__t
__module__t__doc__R«R2R3RR-R6R7RGtpropertyRHRIRJRLRNRORPRYR\R_R$RgRkRlRsRxR~R…RR:R£R#RmRjR¶R%(((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyR*sF																							
		(treR¨RRt
gi.repositoryRRtlandscape.ui.constantsRRRtcompileR	RRRtDialogR(((sC/usr/lib/python2.7/dist-packages/landscape/ui/view/configuration.pyt<module>s			

Youez - 2016 - github.com/yon3zu
LinuXploit