łň ­ëEc@s0dZddklZdefd„ƒYZdS(s This module documents a class that creates the text wrap check button for the text editor's preference dialog. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright Š 2005 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com i˙˙˙˙(t CheckButtontMarginCheckButtoncBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s— This class creates a check button for the text editor's preference dialog. The check button allows users to set the buffer's wrapping properties. cCstti|ƒ|i||ƒ|iƒ|iid|iƒ|id|iƒ|_ |i id|i ƒ|_ dS(sŰ Initialize the check button. @param self: Reference to the MarginCheckButton instance. @type self: A MarginCheckButton object. @param editor: Reference to the text editor. @type editor: An Editor object. s/apps/scribes/marginttoggledtdestroyN( Rt__init__t#_MarginCheckButton__init_attributest"_MarginCheckButton__set_propertiest_MarginCheckButton__clientt notify_addt"_MarginCheckButton__show_margin_cbtconnectt_MarginCheckButton__toggled_cbt_MarginCheckButton__signal_id_1t_MarginCheckButton__managert_MarginCheckButton__destroy_cbt_MarginCheckButton__signal_id_2(tselftmanagerteditor((s(plugins/Preferences/MarginCheckButton.pyR)s  cCs2||_||_|i|_d|_|_dS(sç Initialize the button's data attributes. @param self: Reference to the MarginCheckButton instance. @type self: A MarginCheckButton object. @param editor: Reference to the text editor. @type editor: An Editor object. N(t_MarginCheckButton__editorR t gconf_clientRtNoneR R(RRR((s(plugins/Preferences/MarginCheckButton.pyt__init_attributes:s   cCsŹt}|iidƒ}ddkl}||ƒo|iidƒ}n|i|ƒddkl}|i |ƒ|i t ƒddk l }|iii||ƒdS(s— Define the default behavior of the button. @param self: Reference to the MarginCheckButton instance. @type self: A MarginCheckButton object. s/apps/scribes/margini˙˙˙˙(ttruth(tmsg0019(tmargin_check_button_tipN(tFalseRtgettoperatorRtget_boolt set_activeti18nRt set_labeltset_use_underlinetTruetSCRIBES.tooltipsRRttiptset_tip(Rt show_margintvalueRRR((s(plugins/Preferences/MarginCheckButton.pyt__set_propertiesJs    cCs˛|idƒ}|oQ|iƒtjo|itƒnddkl}|iii |ddƒnH|iƒo|itƒnddkl }|iii |ddƒdS(sŁ Handles callback when text wrapping properties change. @param self: Reference to the MarginCheckButton instance. @type self: A MarginCheckButton object. s/apps/scribes/margini˙˙˙˙(tmsg0020tsucceedi(tmsg0021N( Rt get_activeRRR"RR)Rtfeedbacktupdate_status_messageR+(Rtclienttcnxn_idtentrytdataR&R)R+((s(plugins/Preferences/MarginCheckButton.pyt__show_margin_cb^s cCs…|iƒ}|o4|iidƒtjo|iidtƒqqn+|iidƒo|iidtƒn|iidƒtS(sY Handles callback when the "toggled" signal is emitted. @param self: Reference to the MarginCheckButton instance. @type self: A MarginCheckButton object. @param button: Reference to the MarginCheckButton. @type button: A MarginCheckButton object. @return: True to propagate signals to parent widgets. @type: A Boolean Object. s/apps/scribes/margin(R,RRRtset_boolR"tnotify(RtbuttonR&((s(plugins/Preferences/MarginCheckButton.pyt __toggled_cbrs cCsZddkl}l}||i|ƒ||i|iƒ|iƒ||ƒ~d}dS(s Handles callback when the "destroy" signal is emitted. @param self: Reference to the MarginCheckButton instance. @type self: A MarginCheckButton object. @param manager: Reference to the PreferencesManager instance. @type manager: A PreferencesManager object. i˙˙˙˙(tdisconnect_signaltdelete_attributesN(t SCRIBES.utilsR8R9R RR RR(RRR8R9((s(plugins/Preferences/MarginCheckButton.pyt __destroy_cb‰s   ( t__name__t __module__t__doc__RRRR R R(((s(plugins/Preferences/MarginCheckButton.pyR"s     N(R>tgtkRR(((s(plugins/Preferences/MarginCheckButton.pyss