|Ec@s0dZddklZdefdYZdS(s This module documents a class that creates the window for the automatic replacement dialog. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2006 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com i(tDialogtAutoReplaceWindowcBsDeZdZdZdZdZdZdZdZRS(sG This class creates the window for the automatic replacement dialog. cCsFti||i|||i|iid|i|_dS(sC Initialize the dialog. @param self: Reference to the AutoReplaceWindow instance. @type self: An AutoReplaceWindow object. @param manager: Reference to the AutoReplaceGUIManager. @type manager: An AutoReplaceGUIManager object. @param editor: Reference to the text editor. @type editor: An Editor object. tdestroyN(Rt__init__t#_AutoReplaceWindow__init_attributest"_AutoReplaceWindow__set_propertiest_AutoReplaceWindow__managertconnectt%_AutoReplaceWindow__window_destroy_cbt_AutoReplaceWindow__signal_id(tselftmanagerteditor((s plugins/AutoReplaceGUI/Window.pyR's  cCs(||_||_d|_d|_dS(sC Initialize the dialog. @param self: Reference to the AutoReplaceWindow instance. @type self: An AutoReplaceWindow object. @param manager: Reference to the AutoReplaceGUIManager. @type manager: An AutoReplaceGUIManager object. @param editor: Reference to the text editor. @type editor: An Editor object. N(Rt_AutoReplaceWindow__editortNoneR t_AutoReplaceWindow__status_id(R R R ((s plugins/AutoReplaceGUI/Window.pyt__init_attributes9s    cCs|iddddkl}|id|ddkl}||iidd\}}|idd |id d |i|iid S( s Define the default behavior of the dialog. @param self: Reference to the PreferenceDialog instance. @type self: A PreferenceDialog object. tnames$scribes automatic replacement dialogi(tmsg0005ttitle(t!calculate_resolution_independenceg\(\@s default-widthisdefault-heightiN(t set_propertyti18nRt SCRIBES.utilsRR twindowtset_transient_for(R RRtwidththeight((s plugins/AutoReplaceGUI/Window.pyt__set_propertiesLscCsJddkl}l}||i|i|i||~d}dS(s  Handles callback when "destroy" signal is emitted. @param self: Reference to the AutoReplaceWindow instance. @type self: An AutoReplaceWindow object. @param manager: Reference to the AutoReplaceGUIManager. @type manager: An AutoReplaceGUIManager object. i(tdisconnect_signaltdelete_attributesN(RRRR RRR(R R RR((s plugins/AutoReplaceGUI/Window.pyt__window_destroy_cb]s   cCsO|iid|ddkl}|iii|d|_ti|dS(s Show the preferences dialog. @param self: Reference to the PreferenceDialog instance. @type self: A PreferenceDialog object. s show-dialogi(tmsg0006t preferencesN( R temitRR tfeedbacktset_modal_messageRRt show_dialog(R R ((s plugins/AutoReplaceGUI/Window.pyR%os  cCs:|iid||iii|iti|dS(s Hide the preferences dialog. @param self: Reference to the PreferenceDialog instance. @type self: A PreferenceDialog object. s hide-dialogN(R R"R#tunset_modal_messageRRt hide_dialog(R ((s plugins/AutoReplaceGUI/Window.pyR'|s ( t__name__t __module__t__doc__RRRRR%R'(((s plugins/AutoReplaceGUI/Window.pyR"s     N(R*tSCRIBES.sdialogRR(((s plugins/AutoReplaceGUI/Window.pyss