³ò ¢õEc@s0dZddklZdefd„ƒYZdS(s This module documents a class that creates a button to add words for automatic replacement. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2006 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com iÿÿÿÿ(tButtontAutoReplaceAddButtoncBs2eZdZd„Zd„Zd„Zd„ZRS(sq This class creates a button used to add words for automatic replacement to the automatic replacement dialog. cCsmddkl}ti|d|dtƒ|i|ƒ|iid|iƒ|_ |id|i ƒ|_ dS(sR Initialize the object. @param self: Reference to the AutoReplaceAddButton instance. @type self: An AutoReplaceAddButton object. @param manager: Reference to the AutoReplaceGUIManager instance. @type manager: An AutoReplaceGUIManager object. @param editor: Reference to the text editor. @type editor: An Editor object. iÿÿÿÿ(t STOCK_ADDtstockt use_underlinetdestroytclickedN( tgtkRRt__init__tTruet&_AutoReplaceAddButton__init_attributest_AutoReplaceAddButton__managertconnectt(_AutoReplaceAddButton__button_destroy_cbt"_AutoReplaceAddButton__signal_id_1t(_AutoReplaceAddButton__button_clicked_cbt"_AutoReplaceAddButton__signal_id_2(tselftmanagerR((s#plugins/AutoReplaceGUI/AddButton.pyR(s  cCs||_d|_d|_dS(sW Initialize data attributes. @param self: Reference to the AutoReplaceAddButton instance. @type self: An AutoReplaceAddButton object. @param manager: Reference to the AutoReplaceGUIManager instance. @type manager: An AutoReplaceGUIManager object. @param editor: Reference to the text editor. @type editor: An Editor object. N(R tNoneRR(RR((s#plugins/AutoReplaceGUI/AddButton.pyt__init_attributes;s   cCsZddkl}l}||i|iƒ||i|ƒ|iƒ||ƒ~d}dS(s Handles callback when "destroy" signal is emitted. @param self: Reference to the AutoReplaceAddButton instance. @type self: An AutoReplaceAddButton object. @param manager: Reference to the AutoReplaceGUIManager instance. @type manager: An AutoReplaceGUIManager object. iÿÿÿÿ(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsRRRR RRR(RRRR((s#plugins/AutoReplaceGUI/AddButton.pyt__button_destroy_cbMs   cCs~|iiidtƒ|iiiƒ}|iƒ}|i|ƒ}|iiidƒ}|iiid|d|dtƒt S(sp Handles callback when the "clicked" signal is emitted. @param self: Reference to the AutoReplaceAddButton instance. @type self: An AutoReplaceAddButton object. @param button: Reference to the AutoReplaceAddButton instance. @type button: An AutoReplaceAddButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. t sensitiveitpatht focus_columnt start_editing( R ttreeviewt set_propertyR t get_modeltappendtget_patht get_columnt set_cursortFalse(RtbuttontmodeltiteratorRtcolumn((s#plugins/AutoReplaceGUI/AddButton.pyt__button_clicked_cb`s  "(t__name__t __module__t__doc__RR R R(((s#plugins/AutoReplaceGUI/AddButton.pyR"s    N(R,RRR(((s#plugins/AutoReplaceGUI/AddButton.pyss