³ò £ÞEc@s dZdefd„ƒYZdS(s This module documents a class that adds/removes a menuitem to show the template editor. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2006 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com tMenuItemcBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(sa This class creates an object that adds or removes a menuitem that shows the template editor. cCsT|i||ƒ|iƒ|iid|iƒ|_|iid|iƒ|_dS(s: Initialize the object. @param self: Reference to the MenuItem instance. @type self: An MenuItem object. @param trigger: Reference to the TemplateEditorTrigger instance. @type trigger: An TemplateEditorTrigger object. @param editor: Reference to the text editor. @type editor: An Editor object. tdestroytactivateN( t_MenuItem__init_attributest_MenuItem__add_menuitemt_MenuItem__triggertconnectt_MenuItem__destroy_cbt_MenuItem__signal_id_1t_MenuItem__menuitemt_MenuItem__activate_cbt_MenuItem__signal_id_2(tselfttriggerteditor((s"plugins/TemplateEditor/MenuItem.pyt__init__&s  cCsj||_||_d|_d|_ddkl}ddkl}ddk l }|||ƒ|_ dS(s4 Initialize the object. @param self: Reference to the MenuItem instance. @type self: An MenuItem object. @param trigger: Reference to the AutoReplaceTrigger instance. @type trigger: An AutoReplaceTrigger object. @param editor: Reference to the text editor. @type editor: An Editor object. iÿÿÿÿ(tSTOCK_PROPERTIES(tcreate_menuitem(tmsg0010N( Rt_MenuItem__editortNoneRR tgtkRt SCRIBES.utilsRti18nRR (R R RRRR((s"plugins/TemplateEditor/MenuItem.pyt__init_attributes8s    cCsSddkl}|iii|i|ƒ|iii|iƒ|iiiƒdS(s‰ Add menuitem to the editor's preference menu. @param self: Reference to the MenuItem instance. @type self: An MenuItem object. iÿÿÿÿ(ttemplate_button_tipN( tSCRIBES.tooltipsRRttiptset_tipR tpreference_menutappendtshow_all(R R((s"plugins/TemplateEditor/MenuItem.pyt__add_menuitemOs cCsvddkl}l}||i|iƒ||i|iƒ|iii |iƒ|ii ƒ||ƒ~d}dS(s Handles callback when the "destroy" signal is emitted. @param self: Reference to the MenuItem instance. @type self: An MenuItem object. @param trigger: Reference to the TemplateEditorTrigger instance. @type trigger: An TemplateEditorTrigger object. iÿÿÿÿ(tdisconnect_signaltdelete_attributesN( RR!R"R R RRRRtremoveRR(R R R!R"((s"plugins/TemplateEditor/MenuItem.pyt __destroy_cb\s   cCs|iiidƒtS(sP Handles callback when the "activate" signal is emitted. @param self: Reference to the MenuItem instance. @type self: An MenuItem object. @param menuitem: Reference the the template editor menuitem. @type menuitem: A gtk.MenuItem object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. tshow_template_editor(RttriggermanagerR tFalse(R tmenuitem((s"plugins/TemplateEditor/MenuItem.pyt __activate_cbps (t__name__t __module__t__doc__RRRRR (((s"plugins/TemplateEditor/MenuItem.pyR s    N(R,tobjectR(((s"plugins/TemplateEditor/MenuItem.pyss