³ò EÞfFc@sdefd„ƒYZdS(t OpenDialogcBsqeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z RS( s This class instantiates a dialog that allows clients to select and load files into the text editor. It inherites from ScribesDialog and the gtk.FileChooserDialog classes. See dialog.py and the GTK+ manual respectively for the properties of each class. cCs|i|ƒ|iƒ|id|iƒ|_|id|iƒ|_|iid|iƒ|_|iid|i ƒ|_ dS(sÙ Initialize the text editor's open dialog. @param self: Reference to the OpenDialog instance. @type self: A OpenDialog object. @param window: A possible parent window. @type window: A gtk.Window object. sloaded-documentsrenamed-documents delete-eventtresponseN( t_OpenDialog__init_attributest_OpenDialog__set_propertiestconnectt_OpenDialog__reset_cbt_OpenDialog__signal_id_1t_OpenDialog__signal_id_2t_OpenDialog__dialogt_OpenDialog__delete_event_cbt_OpenDialog__signal_id_3t_OpenDialog__response_cbt_OpenDialog__signal_id_4(tselfteditor((splugins/OpenDialog/Dialog.pyt__init__s  c Csñ||_ddkl}l}|tƒdƒd}||dƒ}ddkl}||ddƒ|_|iid ƒ|_ dd k l }dd k l }|||ƒƒ|_d |_t|_d |_|_|_d |_|_d S( sÒ Initialize the dialog attributes. @param self: Reference to the OpenDialog instance. @type self: A OpenDialog object. @param editor: Reference to the text editor. @type editor: An Editor object. iÿÿÿÿ(tjointsplitt__file__is Dialog.glade(tXMLtdomaintscribesR(tScribesEncodingComboBox(tcreate_encoding_boxN(t_OpenDialog__editortos.pathRRtglobalst gtk.gladeRt_OpenDialog__gladet get_widgetRtSCRIBES.encodingboxRt SCRIBES.utilsRt_OpenDialog__encoding_boxtNonet_OpenDialog__status_idtFalset#_OpenDialog__shortcut_folder_is_setRRR R t_OpenDialog__signal_id_5( R RRRtcwdt glade_fileRRR((splugins/OpenDialog/Dialog.pyt__init_attributes-s   cCsÉddkl}l}l}l}|ii||ƒ|ii||ƒ|ii|iƒ|ii |ƒ|ii |i i ƒ|ii tƒddkl}x!|ƒD]}|ii|ƒq«WdS(sv Set default properties. @param self: Reference to the OpenDialog instance. @type self: A OpenDialog object. iÿÿÿÿ(t STOCK_OPENt STOCK_CANCELt RESPONSE_OKtRESPONSE_CANCEL(tcreate_filter_listN(tgtkR)R*R+R,Rt add_buttontset_extra_widgetR tset_default_responsetset_transient_forRtwindowtset_keep_abovetTruetSCRIBES.dialogfilterR-t add_filter(R R)R*R+R,R-tfilter((splugins/OpenDialog/Dialog.pyt__set_propertiesGs" cCs£|iiƒ|iid|iƒddkl}||iƒddkl}|ii i |dƒ|_ |iiƒ|ii ƒ|ii ƒ|iiƒdS(s‚ Show the text editor's open dialog. @param self: Reference to the OpenDialog instance. @type self: A OpenDialog object. s show-dialogiÿÿÿÿ(tidle_add(tmsg0002topenN(RRtemitRtgobjectR:t_OpenDialog__set_folderti18nR;tfeedbacktset_modal_messageR"tshow_alltrun(R R:R;((splugins/OpenDialog/Dialog.pyt show_dialogZs      cCse|iiƒ|iid|iƒ|iiƒ|io|iii|iƒn|iiƒdS(sy Hide dialog. @param self: Reference to the FileChooserDialog instance. @type self: A FileChooserDialog object. s hide-dialogN(RRR=RthideR"RAtunset_modal_message(R ((splugins/OpenDialog/Dialog.pyt__hidems   $ c CsÎ|iiƒddkl}yk|iiptSn|itjoBddkl}|i i t ||iiƒi ƒƒt |_nWn|j ot |_nX|i i|iiƒ|iiƒtS(Niÿÿÿÿ(tGError(tURI(RRR>RIturiR#R$tgnomevfsRJRtadd_shortcut_folder_uritstrtparentR5t select_uri(R RIRJ((splugins/OpenDialog/Dialog.pyt __set_folder{s % cGs t|_dS(N(R#R$(R targs((splugins/OpenDialog/Dialog.pyt __reset_cbŠs cCse|iƒddkl}ddkl}|||ƒodSn|iiƒ}|ii|ƒt S(Niÿÿÿÿ(tne(R+( t_OpenDialog__hidetoperatorRTR.R+Rtget_urisRt open_filesR#(R tdialogt response_idRTR+turi_list((splugins/OpenDialog/Dialog.pyt __response_cbŽs cCs|iƒdS(N(t_OpenDialog__destroy(R ((splugins/OpenDialog/Dialog.pytdestroy_˜s cCsŽ|ii|i|iƒ|ii|i|iƒ|ii|i|iƒ|ii|i|iƒ|iiƒ|ii|ƒ~d}dS(só Handles callback when the "delete" signal is emitted. @param self: Reference to the OpenDialog instance. @type self: An OpenDialog object. @param dialog: Reference to the OpenDialog instance. @type dialog: An OpenDialog object. N( Rtdisconnect_signalRRR RR tdestroytdelete_attributesR!(R ((splugins/OpenDialog/Dialog.pyt __destroyœs  cGs|iƒtS(N(RUR#(R RR((splugins/OpenDialog/Dialog.pyt__delete_event_cb°s (t__name__t __module__t__doc__RRRRERUR?RR R^R]R (((splugins/OpenDialog/Dialog.pyRs         N(tobjectR(((splugins/OpenDialog/Dialog.pyss