³ò ¢õ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ÿÿÿÿ(tButtontAutoReplaceEditButtoncBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sr This class creates a button used to edit 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( sT Initialize the object. @param self: Reference to the AutoReplaceEditButton instance. @type self: An AutoReplaceEditButton 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_EDITtstockt use_underlinetdestroyscursor-changedtclickeds row-deletedN(tgtkRRt__init__tTruet'_AutoReplaceEditButton__init_attributest_AutoReplaceEditButton__managertconnectt)_AutoReplaceEditButton__button_destroy_cbt#_AutoReplaceEditButton__signal_id_1ttreeviewt0_AutoReplaceEditButton__button_cursor_changed_cbt#_AutoReplaceEditButton__signal_id_2t)_AutoReplaceEditButton__button_clicked_cbt#_AutoReplaceEditButton__signal_id_3t_AutoReplaceEditButton__modelt-_AutoReplaceEditButton__button_row_deleted_cbt#_AutoReplaceEditButton__signal_id_4(tselftmanagerR((s$plugins/AutoReplaceGUI/EditButton.pyR(s  cCsS||_|iiƒ|_d|_d|_d|_d|_|i dt ƒdS(sY Initialize data attributes. @param self: Reference to the AutoReplaceEditButton instance. @type self: An AutoReplaceEditButton 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( R Rt get_modelRtNoneRRRRt set_propertytFalse(RR((s$plugins/AutoReplaceGUI/EditButton.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 AutoReplaceEditButton instance. @type self: An AutoReplaceEditButton object. @param manager: Reference to the AutoReplaceGUIManager instance. @type manager: An AutoReplaceGUIManager object. iÿÿÿÿ(tdisconnect_signaltdelete_attributesN( t SCRIBES.utilsRR RR RRRRRR(RRRR ((s$plugins/AutoReplaceGUI/EditButton.pyt__button_destroy_cbSs   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/EditButton.pyt__button_cursor_changed_cbhs cCs‰|iiiƒ}|iƒ\}}|oJ|i|ƒ}|iiidƒ}|iiid|d|dtƒn|idt ƒt S(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. itpatht focus_columnt start_editingR( R RR#R$tget_patht get_columnt set_cursorR RR(RtbuttonR%R&R'R)tcolumn((s$plugins/AutoReplaceGUI/EditButton.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/EditButton.pyt__button_row_deleted_cb”s ( t__name__t __module__t__doc__RR R RRR(((s$plugins/AutoReplaceGUI/EditButton.pyR"s     N(R6RRR(((s$plugins/AutoReplaceGUI/EditButton.pyss