³ò ¥ŽfFc@sdefd„ƒYZdS(t SaveDialogcBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( sý This class instantiates a dialog that allows clients to change the name of a file and save it. It inherites from ScribesDialog and the gtk.FileChooserDialog classes. See dialog.py and the GTK+ manual respectively for the properties of each class. cCsQ|i|ƒ|iƒ|iid|iƒ|_|iid|iƒ|_dS(sÙ Initialize the text editor's save dialog. @param self: Reference to the SaveDialog instance. @type self: A SaveDialog object. @param window: A possible parent window. @type window: A gtk.Window object. s delete-eventtresponseN(t_SaveDialog__init_attributest"_SaveDialog__set_dialog_propertiest_SaveDialog__dialogtconnectt_SaveDialog__delete_event_cbt_SaveDialog__signal_id_1t_SaveDialog__response_cbt_SaveDialog__signal_id_2(tselfteditor((splugins/SaveDialog/Dialog.pyt__init__s  c CsÁ||_ddkl}l}|tƒdƒd}||dƒ}ddkl}||ddƒ|_|iid ƒ|_ dd k l }dd k l }|||ƒƒ|_d |_d S( sß Initialize the dialog attributes. @param self: Reference to the ScribesOpenDialog instance. @type self: A ScribesOpenDialog object. @param window: A possible parent window. @type window: A gtk.Window object. iÿÿÿÿ(tjointsplitt__file__is Dialog.glade(tXMLtdomaintscribesR(tScribesEncodingComboBox(tcreate_encoding_boxN(t_SaveDialog__editortos.pathR Rtglobalst gtk.gladeRt_SaveDialog__gladet get_widgetRtSCRIBES.encodingboxRt SCRIBES.utilsRt_SaveDialog__encoding_boxtNonet_SaveDialog__status_id( R R R Rtcwdt glade_fileRRR((splugins/SaveDialog/Dialog.pyt__init_attributes+s  cCsÉ|ii|iƒ|ii|iiƒddkl}l}l }l }|ii ||ƒ|ii ||ƒ|ii |ƒ|ii tƒddkl}x!|ƒD]}|ii|ƒq«WdS(sy Set the dialog properties. @param self: Reference to the SaveDialog instance. @type self: A SaveDialog object. iÿÿÿÿ(tRESPONSE_CANCELt RESPONSE_OKt STOCK_SAVEt STOCK_CANCEL(tcreate_filter_listN(Rtset_extra_widgetRtset_transient_forRtwindowtgtkR#R$R%R&t add_buttontset_default_responsetset_keep_abovetTruetSCRIBES.dialogfilterR't add_filter(R R#R$R%R&R'tfilter((splugins/SaveDialog/Dialog.pyt__set_dialog_propertiesBs" cCsƒ|iiƒ|iid|iƒddkl}|iii|dƒ|_|i ƒ|iiƒ|ii ƒ|ii ƒdS(s‚ Show the text editor's open dialog. @param self: Reference to the SaveDialog instance. @type self: A SaveDialog object. s show-dialogiÿÿÿÿ(tmsg0002tsaveasN( RRtemitRti18nR4tfeedbacktset_modal_messageRt(_SaveDialog__set_current_folder_and_nametshow_alltrun(R R4((splugins/SaveDialog/Dialog.pyt show_dialogUs     cCsK|iid|iƒ|iiƒ|io|iii|iƒndS(sy Hide dialog. @param self: Reference to the FileChooserDialog instance. @type self: A FileChooserDialog object. s hide-dialogN(RR6RthideRR8tunset_modal_message(R ((splugins/SaveDialog/Dialog.pyt__hidefs $cCsÓ|iio^ddkl}|iit||iiƒiƒƒ|iit||iiƒi ƒƒneddk l }|ii|ƒddk l }l}y|ii|ƒWn|ii|ƒnXdS(s’ Set the current folder and name in the save dialog. @param self: Reference to the SaveDialog instance. @type self: A SaveDialog object. iÿÿÿÿ(tURI(tmsg0003(tdesktop_foldert home_folderN(RturitgnomevfsRARtset_current_folder_uritstrtparenttset_current_namet short_nameR7RBt SCRIBES.infoRCRDtset_current_folder(R RARBRCRD((splugins/SaveDialog/Dialog.pyt__set_current_folder_and_namexs %)cCs|i|ƒdS(N(t_SaveDialog__destroy_cb(R ((splugins/SaveDialog/Dialog.pytdestroy_s cCs\|ii|i|iƒ|ii|i|iƒ|iiƒ|ii|ƒ~d}dS(sñ Handles callback when the "delete" signal is emitted. @param self: Reference to the SaveDialog instance. @type self: A SaveDialog object. @param dialog: Reference to the SaveDialog instance. @type dialog: A SaveDialog object. N(Rtdisconnect_signalRRR tdestroytdelete_attributesR(R tdialog((splugins/SaveDialog/Dialog.pyt __destroy_cb‘s  cGs|iƒdS(N(t_SaveDialog__hide(R targs((splugins/SaveDialog/Dialog.pyt__delete_event_cb£s cCsh|iƒddkl}ddkl}|||ƒodSn|iiƒ}|iid|ƒdS(Niÿÿÿÿ(tne(R$srename-document( RVtoperatorRYR+R$Rtget_uriRR6(R RTt response_idRYR$tnewuri((splugins/SaveDialog/Dialog.pyt __response_cb§s ( t__name__t __module__t__doc__R RRR=RVR:RPRORR(((splugins/SaveDialog/Dialog.pyRs         N(tobjectR(((splugins/SaveDialog/Dialog.pyss