³ò Ÿ.ÛEc@s dZdefd„ƒYZdS(s  This module documents a class that defines the behavior of the edit button on the template editor. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2007 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com t AddButtoncBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s7 This class defines the behavior of the edit button. cCs_|i||ƒ|id|iƒ|_|id|iƒ|_|iid|iƒ|_dS(s+ Initialize object. @param self: Reference to the AddButton instance. @type self: An AddButton object. @param manager: Reference to the TemplateManager instance. @type manager: A TemplateManager object. @param editor: Reference to the text editor. @type editor: An Editor object. tdestroyslanguage-selectedtclickedN( t_AddButton__init_attributestconnectt_AddButton__destroy_cbt_AddButton__signal_id_1t _AddButton__language_selected_cbt_AddButton__signal_id_2t_AddButton__buttont_AddButton__clicked_cbt_AddButton__signal_id_3(tselftmanagerteditor((s#plugins/TemplateEditor/AddButton.pyt__init__%s cCsT||_||_d|_d|_|iidƒ|_d|_|_ |_ dS(s4 Initialize data attributes. @param self: Reference to the AddButton instance. @type self: An AddButton object. @param manager: Reference to the TemplateManager instance. @type manager: A TemplateManager object. @param editor: Reference to the text editor. @type editor: An Editor object. RN( t_AddButton__managert_AddButton__editortNonet_AddButton__languaget_AddButton__dialogtgladet get_widgetR RRR (R R R((s#plugins/TemplateEditor/AddButton.pyt__init_attributes7s    cCsmddkl}l}||i|ƒ||i|ƒ||i|iƒ|iiƒ||ƒd}~dS(s Handles callback when the "destroy" signal is emitted. @param self: Reference to the ExportButton instance. @type self: A ExportButton object. @param manager: Reference to the TemplateManager instance. @type manager: A TemplateManager object. iÿÿÿÿ(tdelete_attributestdisconnect_signalN( t SCRIBES.utilsRRRRR R RR(R R RR((s#plugins/TemplateEditor/AddButton.pyt __destroy_cbLs   cCs ||_dS(sL Handles callback when the "language-selected" signal is emitted. @param self: Reference to the AddButton instance. @type self: An AddButton object. @param manager: Reference to the TemplateManager instance. @type manager: A TemplateManager object. @param data: Selection information. @type data: A Tuple object. N(R(R R tlanguage((s#plugins/TemplateEditor/AddButton.pyt__language_selected_cb`s cCsfy|iiƒWnNtj oBddkl}||i|i|iƒ|_|iiƒnXtS(sD Handles callback when the "clicked" signal is emitted. @param self: Reference to the AddButton instance. @type self: An AddButton object. @param button: Reference to the AddButton instance. @type button: An AddButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. iÿÿÿÿ(t AddDialog(RtshowtAttributeErrorRRRRtTrue(R tbuttonR((s#plugins/TemplateEditor/AddButton.pyt __clicked_cbps (t__name__t __module__t__doc__RRRRR (((s#plugins/TemplateEditor/AddButton.pyR s     N(R&tobjectR(((s#plugins/TemplateEditor/AddButton.pyss