³ò ˘ġEc@s0dZddklZdefd„ƒYZdS(s This module documents a class that creates a button to edit 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˙˙˙˙(tButtontAutoReplaceRemoveButtoncBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(st This class creates a button used to remove words for automatic replacement to the automatic replacement dialog. cCsİddkl}ti|d|dtƒ|i||ƒ|iid|iƒ|_ |ii id|i ƒ|_ |id|i ƒ|_|iid|iƒ|_d S( sX Initialize the object. @param self: Reference to the AutoReplaceRemoveButton instance. @type self: An AutoReplaceRemoveButton 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_REMOVEtstockt use_underlinetdestroyscursor-changedtclickeds row-deletedN(tgtkRRt__init__tTruet)_AutoReplaceRemoveButton__init_attributest!_AutoReplaceRemoveButton__managertconnectt+_AutoReplaceRemoveButton__button_destroy_cbt%_AutoReplaceRemoveButton__signal_id_1ttreeviewt2_AutoReplaceRemoveButton__button_cursor_changed_cbt%_AutoReplaceRemoveButton__signal_id_2t+_AutoReplaceRemoveButton__button_clicked_cbt%_AutoReplaceRemoveButton__signal_id_3t_AutoReplaceRemoveButton__modelt/_AutoReplaceRemoveButton__button_row_deleted_cbt%_AutoReplaceRemoveButton__signal_id_4(tselftmanagerteditorR((s&plugins/AutoReplaceGUI/RemoveButton.pyR(s cCs\||_||_|iiƒ|_d|_d|_d|_d|_ |i dt ƒdS(s] Initialize data attributes. @param self: Reference to the AutoReplaceRemoveButton instance. @type self: An AutoReplaceRemoveButton 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. t sensitiveN( t _AutoReplaceRemoveButton__editorR Rt get_modelRtNoneRRRRt set_propertytFalse(RRR((s&plugins/AutoReplaceGUI/RemoveButton.pyt__init_attributes=s      cCs€ddkl}l}||i|iƒ||i|iƒ||i|iƒ||i|ƒ|i ƒ||ƒ~d}dS(s" Handles callback when "destroy" signal is emitted. @param self: Reference to the AutoReplaceRemoveButton instance. @type self: An AutoReplaceRemoveButton object. @param manager: Reference to the AutoReplaceGUIManager instance. @type manager: An AutoReplaceGUIManager object. i˙˙˙˙(tdisconnect_signaltdelete_attributesN( t SCRIBES.utilsR!R"RR RRRRRR(RRR!R"((s&plugins/AutoReplaceGUI/RemoveButton.pyt__button_destroy_cbTs   cCsM|iƒ}|iƒ\}}|o|idtƒn|idtƒdS(s{ Handles callback when the "cursor-changed" signal is emitted. @param self: Reference to the AutoReplaceEditButton instance. @type self: An AutoReplaceEditButton object. @param treeview: Reference to the AutoReplaceTreeView instance. @type treeview: An AutoReplaceTreeView object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. RN(t get_selectiont get_selectedRR R(RRt selectiontmodeltiterator((s&plugins/AutoReplaceGUI/RemoveButton.pyt__button_cursor_changed_cbis cCsP|iiiƒ}|iƒ\}}|o|i|ƒn|idtƒtS(st Handles callback when the "clicked" signal is emitted. @param self: Reference to the AutoReplaceEditButton instance. @type self: An AutoReplaceEditButton object. @param button: Reference to the AutoReplaceEditButton instance. @type button: An AutoReplaceEditButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. R(R RR%R&tremoveRR(RtbuttonR'R(R)((s&plugins/AutoReplaceGUI/RemoveButton.pyt__button_clicked_cb~s cGsS|iiiƒ}|iƒ\}}|o|idtƒn|idtƒtS(sC Handles callback when the "clicked" signal is emitted. @param self: Reference to the AutoReplaceEditButton instance. @type self: An AutoReplaceEditButton object. @param args: The other arguments. @type args: An List object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. R(R RR%R&RR R(RtargsR'R(R)((s&plugins/AutoReplaceGUI/RemoveButton.pyt__button_row_deleted_cb“s ( t__name__t __module__t__doc__RR R RRR(((s&plugins/AutoReplaceGUI/RemoveButton.pyR"s     N(R2RRR(((s&plugins/AutoReplaceGUI/RemoveButton.pyss